Fixing 404 Errors in WordPress

By October 23, 2018 WordPress

Although WordPress is truly a powerful platform for building a website, a slight error at the back-end (such as when you change something in the codes or whatever) can bring about a lot of problems. One such example is when your site is up, but some of your posts display a 404 error.

Dealing with 404 Errors

Before reading any further, please make sure that you are really dealing with the problem of WordPress posts returning with 404 error. With this problem, you should still be able to go to your site’s dashboard or admin area (and probably your website’s home page). However, you won’t be able to access certain posts on your website as clicking on a page will give you a 404 error report.

If you are experiencing the above-mentioned problem, don’t panic. Most of the time, you simply can’t access the posts – but they’re still there at the back-end of your site.

With this problem, we can only expect two things. First, your .htaccess file must have been accidentally deleted. And second, the rewrite rules on your website must have been messed up. Remember, a simple error when tweaking website codes at the back-end of your website can bring about a lot of problems.

For now, we’ll assume that the returning 404 issue is caused by any of the 2 instances mentioned above.

What to Do When You Encounter a 404 WordPress Error

If you are a beginner, you’ll be happy to know that it’s easy to fix 404 errors in WP. Just follow these steps:

  1. Go to your Admin Dashboard and click on Settings.
  2. From the Settings area, choose Permalinks.
  3. Save the current settings by clicking on the Save Changes button.

By performing the above steps, the permalinks settings will be updated and the rewrite rules will be reset as well. Yes, that’s what you need to do to fix the problem of 404 Error. Well, the above steps work most of the time, that is. So, if the above method failed to address said problem, do the method discussed below and try again.

Settings Permalinks in WordPress Dashboard

Manually Revise Your .htaccess File

Do these additional steps if the resetting technique discussed above didn’t work:

  1. Use an FTP client (e.g. FileZilla) to log into your server.
  2. Look for the .htaccess file.
  3. Go to the permissions area and replace the current number with 666. Entering this code will temporarily allow files to become rewritable.
  4. Next, manually edit the .htaccess file with this:
# 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]
# END WordPress
  1. Repeat the steps described in the previous section (to update the permalinks).
  2. When done, enter 660 to the permissions area (to replace 666) so as not to allow any rewrites without your consent.


Hope this helped!