How to Fix WordPress Posts Returning 404 Error

WordPress is a popular CMS. Sometimes a small error can make your website inaccessible. However, finding an answer for any WordPress problem is extremely easy (check out the way to properly ask for WordPress support and obtain it. The most common problem that the majority of WordPress users face at some point and also frequently ask on the site point “How to Fix WordPress Posts Returning 404 Error”. During this article, we’ll show you ways to repair WordPress posts returning 404 errors.

How to Fix WordPress Posts Returning 404 Error - Sitepoint

How to Fix WordPress Posts Returning 404 Error – Sitepoint

Usually, during this scenario, a user can access their WordPress admin area, their blog’s main page, but when accessing one post they get a 404 not found error. First of all, don’t get panic. Your posts will still there and completely safe most of the time. This usually happens if your .htaccess file got deleted or something went wrong with the rewrite rules. So to solve this error, try to fix the permalinks setting.

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

How to Fix WordPress Posts Returning 404 Error - Site point

How to Fix WordPress Posts Returning 404 Error – Site point

In this way, you will update your permalinks settings and rewrite rules. In most cases, this solution solves the WordPress posts 404 error. However, if it doesn’t work, then you need to update your .htaccess file manually.

Login to your server using FTP, and modify the .htaccess file which is found within the same location where folders like /wp-content/ and /wp-includes/ are located. The simplest thing you’ll do is to temporarily make the file writeable by changing the permissions to 666. Then repeat the first solution. Don’t forget to vary the permissions back to 660. You’ll also manually add this code in your .htaccess file:

# 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

Local Servers

Often designers and developers install WordPress on their computers employing a local server for testing purposes. If you would like to use pretty permalinks, then you would like to enable the rewrite_module within the Apache configuration of your MAMP, WAMP, or XXAMP.

We hope this article helped you resolve posts returning 404 errors in WordPress. Did this solution work for you? Do you have any other solution, Please share that solution in the comments below? We would like to make this article a comprehensive solution for our users.

If you still found the issue and unable to solve it by yourself then we will recommend contacting the WordPress Expert to solve that issue or any other WordPress issue. You can also hire him for other WordPress projects.

Leave a Reply