Fix WordPress 404 Permalink Error
While most of the problems with permalinks can be dealt with by a fresh install of WordPress there are a few things that aren’t. I have recently solved a problem that was not affected by the WordPress re-install.
The problem is when you get a 404 error page when you click on the permalink.
The first thing to do is to look at your .htaccess file in your blog’s WordPress root directory, there are many sites that give details about what should be in there that can solve other problems like image uploading but not many about permalinks.
If you have a .htaccess file, rename it to .backup or something different anyway so you can still put it back if breaks other aspects of your site.
Now go to the settings in your blog admin and select permalinks. Select the one you want and confirm it. Now you should have a new .htaccess file and permalinks might be working. This fixed my problem anyway. To fix my friends problem was slightly more complicated because it involved editing Apache’s httpd.conf file. This is easy if you are testing locally because it will be located in the Apache folder (in wamp or xamp or whatever you have installed). If you are editing on the server you might need to contact your hosting provider to find out where it is or even if you are allowed to access it.
Once found you need to search for ‘mod_rewrite’ and make sure there is no ‘#’ at the start of the line. I came across some very useful information on this site. It may help you too.