Fix WordPress Posts Returning 404 Error

wordpress 404 error

We have covered most of the common occurring problems in WordPress such as error establishing database connection, internal server error, fatal error of exhausted memory, htmlspecialchars() and much more. This is another common problem which occurs while users try to access posts and in return receives 404 Not Found Error. However, in this case the admin area of your WordPress remains accessible. It is observed that mostly this happens when either some went wrong with your .htaccess file or it gets deleted or if you try to update your WordPress site’s permalink but the file permissions are not set to 666.

Solution for fixing 404 Error:

1. Access your website’s server using FTP.

2. Modify .htaccess file which could be found on the same directory where your website files are kept.

3. Right click on the file and select file permissions.

4. Change the file permissions to 666.

5. Now add the following code in your .htaccess file and save it.

# 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

6. Change .htaccess file permission back to 660.

Now try accessing single posts of your WordPress blog, hopefully it will be working on. In case if the issue is still there try to verify that you followed all the steps properly. Make sure to revert the file permission back to 660 to keep it secure.

In case if you don’t have an access to FTP and your posts are returning 404 error then I would suggest to select the old permalink structure and the problem will be resolved. Once you get the access follow the steps mentioned above and choose the desired permalink structure.

Previous articleGoogle Official WordPress Plugin for Publishers
Next articleHow to Change a Username in WordPress
I’m Hasan, by profession a Marketer currently working as Head of Digital Marketing at Allainet, Pakistan office. Frankly speaking I love what I do and consider myself to be one of the luckiest person on the earth. Well, I don't make millions of dollars from my sites to drive a fancy car neither became super famous yet. What I do have is a beautiful wife, two amazing daughters, a loving family, awesome friends and the line of work that makes me feel special.

Leave a Reply