普通网友 2018-05-25 11:18
浏览 40
已采纳

导入wordpress网站

Someone gave me a wordpress website (files and sql dump), I imported the database into mysql and the files onto my ftp. I modified the site and home url in the option table and opened the website.

The index page is fine but any link I click returns a 404. So I thought about .htaccess and tried the default one:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

But now instead of 404 I have a text like that:

Login
mysitename

How can I know what's the problem ?

  • 写回答

2条回答 默认 最新

  • duanjie3267 2018-05-25 15:38
    关注

    I finally found a solution:

    • in the template-loader.php file I commented out do_action( 'template_redirect' ); which solved the 404 error for url like domain.tld/index.php?page_id=123 but not for formated url like domain.tld/cat/title
    • as it gave me access to admin I verified the site url in the settings and saved. - I also modified permalink style and saved several times (it didn't work first time)

    Now it works

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 这种微信登录授权 谁可以做啊
  • ¥15 请问我该如何添加自己的数据去运行蚁群算法代码
  • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”
  • ¥15 网络设备配置与管理这个该怎么弄
  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来