CYBER WEEK SALE - 50% OFF ALL HOSTING PLANS
50% OFF ALL NEW PLANS

This article will help you troubleshoot and restore your website if suddenly 404 error pages start to appear instead of your website pages.

What are 404 error codes?

Generally, 404 errors indicate that a requested page or resource was not found on the server. A resource can be any file, directory, image, or URL. You can read more about the different error codes in our article on Apache error codes (401, 403, 404, 412, 500). However, WordPress can sometimes display 404 errors, even if the requested page is available. This is usually caused by a configuration issue within WordPress itself.

Error 404

 

How to fix 404 error codes in WordPress?

Check your Permalinks settings

If your WordPress website starts displaying a 404 error page, even if the requested page, post, or resource is available on the server, there might be a problem with your Permalinks configuration. The first thing you need to try is to log in to your WordPress Dashboard, and go to Settings > Permalinks. There, make sure the settings are set to reflect your website's desired URL structure, and hit the "Save Changes" button. Even if you don't make any changes on this page, you still need to hit the "Save Changes" button. This will re-generate your permalinks settings, and allow WordPress to access existing pages and resources again:

Wordpress permalinks settings

Re-saving your Permalinks settings generally helps with most problems that might cause 404 errors.

Check your plugins

Sometimes, the 404 errors might be caused by a plugin conflict, or by a malfunctioning plugin. In this case, disabling all plugins on your website should help. You can disable all plugins by clicking on the Disable button next to the "Disable all plugins" option in the Tools section of your hosting Control Panel > WordPress Manager:

Deactivate all WordPress plugins

More information on how to disable all plugins with a single click is available in our article on disabling WordPress plugins. You can then access your Dashboard and start to enable the plugins you are using one by one to identify the plugin causing the issue. Each time you enable a plugin, please refresh your website in a separate browser window to check if the 404 errors return. If the errors return, you should disable the last plugin you enabled, and contact the plugin developer to report the problem.

Restore from a backup

If your website was working properly and started to display 404 error codes after you made a change, you can try to restore your files and database from the system backups on the server. You need to restore from a backup created before the change that caused the problem was made. This should restore your website to its previous state. Please note that when restoring, all changes that have been made after the backup you are restoring from was created, will be lost. Instructions on how to restore can be found in our article on restoring data from the backup.

Check your files and directories

If you continue to experience 404 error codes when requesting a specific page or resource, you can check whether the file, directory, or resource actually exist on the server. If you are looking for a page or a post, you can check whether the item actually exists through your WordPress Dashboard. Respectively, if you are looking for a file or a directory, you can use the File Manager in the Control Panel of your account to browse your files and directories and verify the file or directory you are looking for is there.