Skip to main content

404 Error

WordPress posts returning 404 Error

Mostly in this situation you can access the WordPress admin area, the blog’s main page, but when opening a single post, your WordPress posts returning 404 Error. First it must be ascertained that the 404 error is being caused by the web server or by WordPress.

Check static file

Open your static file(e.g. a jpg image) like:

If it is does not exist in media uploads directory, you have found the source of your 404 Error. If it is exit and then producing a 404 error page. It usually happens if your WordPress .htaccess file got deleted or something went wrong with the rewrite rules. You need to fix your permalinks settings by doing the following:

Login to WP-ADMIN then go to Settings> Permalinks and click on the Save Changes button.

How to update .htaccess file

It will update your WordPress permalinks settings and flush the rewrite rules. If the problem is not fixed, then you need to update your .htaccess file manually. Login into your server using FTP, and modify the .htaccess file which is located in the same location where your WordPress folders like /wp-content/ and /wp-includes/ are located. You can add the code in your .htaccess file that is mentioned below.

# BEGIN WordPress

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

# END WordPress

This is the easiest method that you can add the code to make the file writable by changing the permissions to 666.

In this article you learn how to fix wordpress 404 error on all pages.

One thought on “WordPress posts returning 404 Error

Leave a Reply

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

Translate »