开发者

WordPress 404 Errors

开发者 https://www.devze.com 2022-12-14 04:06 出处:网络
I moved a Wordpress website from one server to another and I am now getting 404 errors on everything but the home page.

I moved a Wordpress website from one server to another and I am now getting 404 errors on everything but the home page.

I also checked that the .htaccess file is there and the database contents. They are fine. Not sure what else 开发者_Python百科could be causing this.

Any ideas from the community?


Assuming you have pretty permalinks enabled, are you sure that the new server has mod-rewrite enabled? You can also check to see if this is the problem by going to a pagelike yoursite.com/?p=1 where 1 is a page id.


Assuming the URL has changed

You need to update either the database or (if you're lucky) one of the .php files in the wordpress distro - see the wordpress article on this.

I had the same issue and ended up having to edit the database. You're seeing the 404's because wordpress thinks it's still hosted at the old URL and is therefore trying to retrieve files from it.

If the URL has not changed

Perhaps permissions need updating on the folders? The folders should be set at 755 and the files 644 (reference here).


Looks like you may have solved the problem - I had a similar problem where permalinks would not work, but the default links did work. I modified the .htaccess file to what Wordpress said to do. Twice I thought I had solved the problem, but didn't.

I had moved it to my local Ubuntu Karmic Koala system for testing, and found that the solution involved editing a file in /etc/apache2/sites-enabled. On my system, it was called 000-default.

This file had statements like the .htaccess file, and in two places had AllowOverride None, which I had to change to AllowOverride All. Apparently, this file overrides any local .htaccess files.

I also had to change the location of Wordpress in the main configuration, but that was obvious.

I hope this will help someone who has tried all the normal suggestions like me, and is still having problems.

0

精彩评论

暂无评论...
验证码 换一张
取 消