Home  »  ArticlesGuidesTechnology   »   How to Fix Posts Displaying the WordPress 404 Error

How to Fix Posts Displaying the WordPress 404 Error

It is not uncommon to be hit by WordPress 404 errors on occasion. This may be triggered after installing or updating a plugin, theme or some unknown reason.

Whatever the cause, this problem is caused by a missing or badly formed .htaccess file located in the document root of your WordPress installation.

The good news is that there is a rather simple fix that can solve this problem.

This problem may almost exclusively happen when the permalink settings have been changed to anything other than the default for SEO purposes.

You always want to use one of the SEO URL friendly permalinks that WordPress provides so restoring and maintaining the default URL pattern may not be ideal and this is why we need this solution.

Fixing the WordPress 404 Errors

Sign in to your WordPress dashboard. navigate to the ‘Settings’ > ‘Permalinks’ Node from the left side menu.

Option 1: Scroll down the page and click on the ‘Save Changes’ button. That should solve your problem.

In the ICT real-world things don’t always work out as expected. If the above step does not work then proceed below.

Option 2: From the same Permalinks page, select the ‘Plain’ radio button option and save the change. Thereafter go back to the previous option and select it the once again save your changes.

WordPress 404 Errors

Option 3: If the above options do not work you may have to edit the .htaccess file manually. You will need to use an FTP client such as FileZilla to download the .htaccess file. Even though you can create a blank new file, we do not recommend it just in case you have an existing plugin that made additions to this file.

Once you have downloaded this file enter the following code between the # BEGIN WordPress and # END WordPress lines.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

If they do not exist place them at the end of the file then upload them back to the server.

Option 4: If you still have the WordPress 404 errors showing up on every post and page link then you might have to go to the ‘Plugins’ node from the left side menu in the WordPress dashboard.

Disable all plugins and see if it fixes the problem. You may have to repeat Option 1 above after disabling all the plugins.

Activate the plugins one at a time and check the links each time. If a plugin was the culprit the WordPress 404 errors problem should resurface once the offending plugin is reactivated.

You may then have to report the problem to the plugin developers and if possible find a different plugin to replace the buggy one.

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.

Available under:
Articles, Guides, Technology