Fixing WordPress Pages Returning 404 error

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 Error. In this article we will show you how to fix WordPress posts returning 404 error.

EAC Directory; WordPress 404 Error


Usually in this scenario a user can access their WordPress admin area, their blog’s main page, but when accessing a single posts they get a 404 Not found error. First of all, don’t panic most of the time your posts 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.


EAC Directory; WordPress 404 Error


This will update your permalinks settings and flush rewrite rules. In most cases this solution fixes the WordPress posts 404 error. However, if it does not work for you, then you probably need to update your .htaccess file 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. The easiest thing you can do is to temporarily make the file writeable by changing the permissions to 666. Then repeat the original solution. Don’t forget to change the permissions back to 660. You can also manually add this code in your .htaccess file:

01 # BEGIN WordPress
02 <IfModule mod_rewrite.c>
03 RewriteEngine On
04 RewriteBase /
05 RewriteRule ^index\.php$ - [L]
06 RewriteCond %{REQUEST_FILENAME} !-f
07 RewriteCond %{REQUEST_FILENAME} !-d
08 RewriteRule . /index.php [L]
09 </IfModule>
10 END WordPress

Fix for Local Servers

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


  • 281 Users Found This Useful
Was this answer helpful?

Related Articles

wordpress blank pages

This article discusses what to do when WordPress displays a blank page, aka "white screen of...

migrating a wordpress site from subdirectory to root directory

Before migrating WordPress from subdirectory to root directory 1. Be sure you have access to...

How to improve WordPress Security

Nowadays we face a lot of security issues with different content management systems (CMS) and web...

editting php options

You can change the Php Options through c panel as follows 1. Login to c panel and search for PHP...

essential plugins

Having many plugins on your WordPress site is not a good practice as they slow down your...