WordPress Posts Returning 404 Error - How to fix it ?



The HTTP error 404, or more commonly called "404 error", means that the page you are trying to open could not be found on the server. This is a client-side incident which means either the page has been deleted or moved, and the URL has not been modified accordingly, or that you have misspelled the URL.

Here at Ibmi Media, as part of our WordPress Support Services, we regularly help our Customers to fix WordPress related issues.

In this context, we shall look into how to fix WordPress posts returning 404 error.


Nature of WordPress Posts Returning 404 Error ?

When this error happens, 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.

404 error generally occurs if your .htaccess file got deleted or something went wrong with the rewrite rules. 


How to fix WordPress Posts Returning 404 Error ?

To resolve this error, you can try the following tips:


1. Log into your Admin area of the WordPress website and navigate to "Settings » Permalinks", and simply click on Save Changes button.

This will update your permalinks settings and flush rewrite rules. In most cases this solution fixes the WordPress posts 404 error. 

2. However, if it does not work for you, then you probably need to update your .htaccess file manually.

To do this, 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:

# 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]
</IfModule>
# END WordPress

Fixing WordPress 404 Error on Local Servers

Sometimes, web 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.


[Need urgent support to fix WordPress errors? We are available to help you. ]


Conclusion

Are your WordPress posts showing a 404 error? Can't get custom permalinks to work? 

This article will guide you on resolve posts returning #404 error in #WordPress. To fix this #error, login to your WordPress Admin dashboard. In the left-hand menu, go to Appearance -> Theme Editor. On the right side of the screen, you should find a 404 template (404. php file) you have to customize as you want.

The most appropriate way to handle 404 errors on your WordPress site, is by creating a custom 404 error page.


Related Post


Keep In Touch

We hope to hear from you.

Accept File Type: jpg,jpeg,png,txt,pdf,doc,docx