English 中文(简体)
WordPress 404 Errors
原标题:

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 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.





相关问题
Ignore symlinks in clean URL s in .htaccess

Example URL: example.com/user /user is both a symlinked directory and a valid URL to content on my site. I user Horde Routes to request the content and all requests to the site go through index.php. ...

.htaccess File Options -Indexes on Subdirectories

I have the following .htaccess line, simple no indexes on root. Options -Indexes What do we add so it propagates to any sub directory instead of having to create one file for each? One .htaccess on ...

Mod Rewrite ignoring -d

After a day or two, I am still fighting with Mod Rewrite. It seems that 60% of my development time is spent battling the server. My current URL structure is such that all http://example.com/xyz and ...

ErrorDocument 404 Not Sending Referrer Information: PHP

I m using a standard htaccess ErrorDocument 404 to redirect users to a new page. In order to customize the 404, I need to know their referrer information (from the page they Tried to visit). $...

Find all htaccess files on server [closed]

I m looking for a Linux command to go through all the directories on my server and find all .htaccess files. The output would be a list of all those files with full path, creation/modification date ...

301 Redirect Help with Dynamic URL s and Multiple Id s

I just did a redesign for www.wildchildclothes.com which has a new URL structure. The old site ran on Zen Cart and had a bad URL structure. Here are some examples of what I want to redirect from: OLD:...

热门标签