How to Fix Posts Returning 404 Error in WordPress

How to Fix Posts Returning 404 Error in WordPress

All it takes is one minor tweak to make your website inaccessible. WordPress is a quite robust content management system (CMS). On the positive side, finding the error that made your site inaccessible (by using support forums) is incredibly easy. 404 error is a common problem faced by most of the WordPress users. Read further to know how to fix posts returning 404 error in WordPress.

404 not found

How to fix 404 Error in WordPress?

404 Not found error usually affects a single blog post. This means that the user can access their blog’s main page and WordPress admin area. The affected post does not lose its content, and it’s completely safe, so there’s no need to worry.

Sometimes the .htaccess file gets deleted, or something goes wrong with the rewrite rules, causing the 404 Not found error. You need to fix the permalinks setting in this case.

You’ll have to go to Settings » Permalinks and click on Save Changes button.

permalinks save changes

The above step will update your permalinks settings and flush the rewrite rules. WordPress posts 404 error should be fixed by this solution in most cases. In case it does not work for you, then you’ll probably have to update your .htaccess file manually.

To update your .htaccess file manually, log in to your server using FTP. After logging in, modify the .htaccess file located in the same location where folders like /wp-content/ and /wp-includes/ are located.

Temporarily make the file writable by changing the permissions to 666, this is the easiest thing you can do. Keep in mind to change the permission back to 660. Following is the way to add this code to your .htaccess file manually:

# 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]
</IfModule>
# END WordPress

The above solution shall resolve the error 404 Not found error. We hope that this article helped. If you know any other method of fixing posts returning 404 error in WordPress, please share with us in the comments section.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.