How to Fix WordPress Posts Returning 404 Error


WordPress is a powerful CMS. Sometimes a slight tweak can make your website inaccessible. However, finding a solution for any WordPress problem is extremely easy. A common problem that most WordPress users face at some point is WordPress posts returning a 404 Not Found Error. In this article we will show you how to fix it.

Usually in this scenario a user can access their WordPress admin area, the main page of their blog, but by accessing a single entry you get an error 404 not found.  Most of the time your messages are still there and completely safe. This usually happens if your .htaccess file got deleted or something went wrong with the rewrite rules. What you need to do is fix your permalinks settings.

Go to Settings » Permalinks, and simply click on Save Changes button.

This will update your permalinks settings and flush rewrite rules. In most cases this solution fixes the WordPress posts 404 Not Found error. However, if it does not work for you, then you probably need to update your .htaccess file manually.

How to configure file .htaccess manually:

Login to your server using FTP, and modify the .htaccess file which is located in the same location where folders like /wp-content/ and /wp-includes/ are located. Manually add the following code to your . htaccess file. If the file does not exist, create it using a text application and upload it to your hosting in the correct location.

# 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

We hope this article helped you resolve posts returning 404 Not Found error in WordPress.