‘404’ refers to the error code displayed by your browser when it cannot find what you are looking for. Your…


How to Fix the 404 Error for WordPress Sites

‘404’ refers to the error code displayed by your browser when it cannot find what you are looking for. Your browser will always search for the URL entered, regardless of whether it exists. If it’s unable to find anything, you will see an error:

How to Fix the 404 Error for WordPress Websites:

1. Fix Your Permalink Settings:

Go to Settings » Permalinks, and simply click on Save Changes button.

update-permalinks

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

2. Edit Your .htaccess File Manually

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.

As we mentioned earlier, the file we’re looking for is called .htaccess. Before you continue, make sure you right-click the file and select Download. This gives you a way back if you make a mistake. When you’re ready, choose the View/Edit option:

404-image

This will open the file using your default text editor – you’ll want to delete the contents and replace it with WordPress’ default settings:

# BEGIN WordPress

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

# END WordPress

Now save your changes and try re-accessing your posts. They should be working, although you may have to go back to the Permalinks tab in WordPress and re-configure your URL structure to get it back to the way it was before.

 

Leave a Reply

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