Home » Web Design and Development » Content Management System » Wordpress » How to fix WordPress pages / posts 404 error ?

How to fix WordPress pages / posts 404 error ?

If by some reason you are not able to access your wordpress based websites pages / posts and you are getting an error like, “Not Found” “The requested URL /page_or_post_name/ was not found on this server.” “Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.” even if you can see a home page and are able to access dashboard, then there could be some issues with your websites .htaccess file which resides at the home folder of your website code.

To fix this, you can follow below two ways,

Login to your websites wordpress dashboard as, http://www.yourwebsite.com/wp-login.php , after entering your admin details, you might be redirected to your dashboard as http://yourwebsite.com/wp-admin/index.php Or if it didn’t automatically redirected then you can type this URL http://yourwebsite.com/wp-admin/index.php and press enter Now, from dashboard settings, go to Settings -> Permalink and select url link types as you want and click “Save Changes”. Once thats saved, this will automatically create .htaccess file in your website home folder in hosting and you should be able to view the pages / posts which were showing 404 error.

OR if above method didn’t worked, you can manually create and update .htaccess at your websites source code in top directory as,

# BEGIN WordPress

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

and save this .htaccess file and now try to access post/pages, and it should be working now.

Leave a Comment