How to Fix Pages And Posts Return a 404 Not Found Error in WordPress

How to Fix Pages And Posts Return a 404 Not Found Error in WordPress

Are you facing the pages and posts returning a 404 not found error in your WordPress website? Looking for a way to fix the issue easily and quickly? Here in this article, you will guide you to solve the pages and posts returning a 404 error in your WordPress website.

WordPress is very powerful with lots of features and functionalities. You can add so many unique features with WordPress to your website. If you face any problem with your website you can easily solve it with WordPress. For beginners, you can face many errors and issues in WordPress. But with easy troubleshooting, you can solve it.

Post returning 404 error is one of the common errors in WordPress. Before fixing the error you need to find out the problem first. So let’s what are the reasons for the 404 error and how to solve them.

What causes the 404 error

There are different reasons behind this error. Here we will try to cover all the possible and common reasons for 404 errors.

Wrong or misspelled URL

All of us use URLs to go to any website. Most of the time we need to type the URL on our devices manually. So a small spelling mistake can lead a user to a 404 page.

Delete or move the page

Sometimes website owners need to delete a page or move a page from a different location. When a user deletes or moves a page, it is a good practice to redirect the page to the new URL. So that the users can see the latest information. But if the website owners don’t add a redirect link then users can see the 404 pages.

Server malfunctioned

If your server is malfunctioning or shut down then you don’t have anything to do. You just need to check your server that it’s working properly. If you face any issues you can contact your hosting provider.

Fix post returning 404 not found WordPress error

When this problem happens you can access the website admin area and blog the main page but when you go to any single post page you will see the 404 error message.  This problem is not a big issue so you don’t need to panic. This problem happens when your .htaccess file gets deleted or has the wrong setting.

To fix this problem you need to update your website permalink setting. To update the permalink setting go to Settings > Permalinks and click on the save changes button without editing anything.

fix post returning 404 error

It will update your website with all the permalinks and flush rewrite rules. This method will solve the problem easily but if this fails to solve your problem then you need to manually edit the .htaccess file.  To access the .htaccess file you need to login to your server with an FTP client.

You will find the .htaccess file in the same location where the/wp-content/ file is available. By default, .htaccess files are not writable. You can make it writeable by changing the permissions to 666. After that manually add this little code snippet.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
After adding the code change the file permission to 660. Save the file and check whether your website problem is solved or not.
If you install WordPress on your local server and face this type of problem then you need to enable the rewrite_module in the Apache configuration of XXAMP, MAMP, and WAMP.

Wrapping Up

Following the process, you will be able to fix the pages and posts returning a 404 error in WordPress. You can see our other articles to learn How to fix Add Media button not working in WordPress

How to fix mixed content errors in WordPress

How to fix the “Are You Sure You Want to Do This” Error in WordPress

We hope this article will help you. If you like this article please like our Facebook page to stay connected.

One Comment

  • How to Fix WordPress Mixed Content SSL Warning – Free Website Monitoring Service || UptimeMonster
    1:10 pm

    […] Following the process, you will be able to fix WordPress mixed content SSL warnings. You can see our other artilces to learn How to Fix Pages And Posts Return a 404 Not Found Error in WordPress […]