How to fix HTTP 404 Not found error in WordPress

How to fix HTTP 404 Not found error in WordPress

The HTTP 404, 404 Not Found error message is a Hypertext Transfer Protocol (HTTP) standard response code, in computer network communications, to indicate that the browser was able to communicate with a given server, but the server could not find what was requested.

In simple words, this means that you’ll see the 404 error code only when the URL of the post/page is changed or deleted or isn’t available at that location anymore.

Sometimes HTTP 404 Not found error also happens if your .htaccess file got deleted or something went wrong with the rewrite rules.

To fix HTTP 404 Not found error, Follow the below steps:

However, To fix HTTP 404 Not found error, What you need to do is fix your permalinks settings.

How to fix you permalinks settings

Generally, Solution to this 404 Error is easy. Sometimes this problem gets solved only by saving your permalinks settings. By doing this, it will update your .htaccess file with the correct configurations for your WordPress website.

To save permalinks, login to your WordPress dashboard and go to Settings > Permalinks.

fix HTTP 404 Not found error using Permalinks

Next, Scroll down to the bottom and simply click Save Change.

Permalinks

After that try accessing your posts/Page to see if the issue is resolved.

If the above solutions do not work, you may have to make changes to your .htaccess file manually. Access the .htaccess file again whether through FTP or cPanel. This time, you have to edit the file.

Or if you use Yoast Plugin, you can simply edit your .htaccess file from the WordPress Dashboard (Recommended).

To edit .htaccess, login to your WordPress dashboard and go to Yoast SEO > Tools > File editor.

Edit .htaccess file using yoast

Click on File Editor.

.htaccess file to fix HTTP 404 Not found error

Now, copy the existing code and keep it safe somewhere else.

After that copy the below code and paste it to the editor and click on Save Change to .htaccess.

# 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

This will reset the rewrite capabilities of WordPress and should solve the 404 error on your posts/pages.

If the problem still persists, then you can simply check whether post/page is there on your directory or not. If it is not there, then you can simply redirect the old URL to the new URL using the Redirection Plugin.

How to redirect Old URL to New URL using Redirection Plugin

Firstly, you have to install the Redirection plugin. It is a free plugin. Install the plugin using Regular method. Login to the WordPress dashboard, Go to the Plugins > Add New.

Search for “Redirection” and Click on Install and then Activate the Plugin.

However, You can also Download and Install Manually using FTP or cPanel.

After Activating the plugin Go to Tools > Redirection.

Use Redirection to fix HTTP 404 Not found error

Click On Add New.

Redirect url to fix HTTP 404 Not found error

Now, Enter the old URL as a Source URL and New URL as a Target URL and rest keep it as default.

After that click on Add Redirect. All Done.

Conclusion

The HTTP 404, 404 Not Found error may seem simple, but it can do a lot of damage. If your visitors can’t find the pages they want, they might look elsewhere for what they need. This may also lead to Poor google ranking. So keep checking for 404 Error on Google Search Console. If you find any error fix it as soon as possible.

We hope this article would have helped you to resolve 404 Page not found error in WordPress. If you have another solution that worked for you, please share it in the comments below.


This Post Has One Comment

Leave a Reply