How to Fix Wordpress' "Not Found" Error
Are you getting a "not found" error when visiting pages during the setup of your Wordpress site? It's a simple thing to fix...don't worry! This brief guide shows you how easy it is.
Get your Wordpress site's admin panel open, navigate over to "Settings" and let's get started.
Is This the Error You're Seeing?
The requested URL /my-category/my-page was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
About the Wordpress "Not Found" Error
If you're reading this, you must have gotten it!
One of the scariest things a webmaster or blogger could see on their Wordpress blog is the dreaded "Not Found" error. If it shows up, it appears when visiting any non-home page area of your site. Don't worry, though - it's a simple, stupid issue that takes seconds to fix :)
Why did this happen in the first place?
This error is most likely due to the fact that you've changed your Wordpress permalink structure. The settings for your permanlink structure are found in your Admin panel, under Settings » Permalinks. Basically, it lets you choose how the URLs of your Wordpress site will look.
The default is always the first radio button, which says "http://www.mysite.com/?p=123". However, if you're like me - you'd rather have something more search engine friendly like "http://www.mysite.com/category/page" -- and you probably selected the last option which says "Custom Structure," then saved the change. This is where the error occurs!
Here's the reason why: by default, your .htaccess file is CHMODded to 644: disallowing Wordpress to successfully edit it. You'll even see the message in your admin panel under "Permalinks" that says this:
If your .htaccess file were writable, we could do this automatically, but it isn't so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.
It is very easy to look past this message due to the fact that it's at the bottom of the screen, appearing in italics, and nearly blending in with the box above it. Anyway - in order to successfully change your permalink structure, you would have had to make the permission settings of your .htaccess file more lenient, so that Wordpress can be able to write changes within it.
If you see the "If your .htaccess file were writeable..." message, that's root of your problem! Read below for the simple fix :)
How to Fix the Error - Don't worry, it's super easy...and quick
- Get into your website's FTP space, and look for the .htaccess file
- Highlight the .htaccess file in your FTP program, and open its CHMOD settings. It's probably set to 644. Change it to 666.
- Go back into your Wordpress site's admin section, and navigate to Settings » Permalinks.
- Edit the link structure to whatever you originally wanted, and then save it. You should no longer see a "grayed out" .htaccess box on this page, saying that the file is not writable.
- Visit any page of your site, refresh, and confirm that the error no longer occurs.
- Finally, as a security measure, go back to your FTP space and change your .htaccess file from 666 back to 644 (for security purposes) since you probably will never have to edit it through the Wordpress admin panel ever again.