How to fix a 404 error in WordPress?

[et_pb_section admin_label=”section”] [et_pb_row admin_label=”row”] [et_pb_column type=”4_4″][et_pb_text admin_label=”Text”]

Fix a 404 error in WordPress

WordPress 404 error message is very common error one comes across when surfing the internet. If you are the developer of a site and you have this particular problem, this article is for you. We will provide an easy and safe solution to troubleshoot this problem. The fix can include editing sensitive WordPress files in the backend. It is therefore advised to make a backup of your site before editing any WordPress core file.

What does 404 not found mean?

When your browser requests a server for a web page. The server returns the data consisting of the content of that page in the HTTP response message. This happens when everything works perfectly. When the server cannot deliver the requested data to the browser, it gives an error message along with the status code. Different status codes like 500, 502 have a different meaning. The 404 not found is also an error message and 404 is the status code of the error. This means that the requested page was not found on the given URL. It might have moved, someone deleted the page or the permalink has been changed. Different browsers display this error message differently. Chrome browsers display this the 404 not found error message like the following.

404 Error Message in Chrome Browser

Because of the variations of the browsers, this error can also be displayed in one of the following forms.

  • The page cannot be found
  • The requested URL/* was not found on this server. That’s all we know.
  • Page Not Found
  • Not Found
  • The requested URL was not found on this server.
  • 404 not found
  • HTTP error 404

Causes of the 404 not found error message

Apart from hosting issues, there can also be some other issues that lead to generating this error message. If you come across this error message, we first recommend consulting your hosting provider. If they say the problem is not at their end, then the following reasons might have lead to the problem.

  • Invalid permalink structure
  • .htaccess file issue
  • Themes or Plugins issue

Invalid permalink structure

If the error message is displayed when you access any post or page, It means that the problem is site-wide and is due to some issues in the site. If it is displayed on one or particular pages or posts then the problem is in those pages or posts. But if it is site-wide, then one reason may be a change in permalink structure. This can happen when you install a new Plugin.

Solution

  • Open your WordPress dashboard
  • Go to settings>permalinks
  • Just click on Save Changes
Change permalink setting in WordPress dashboard

Here you just click on “Save Changes” and don’t make any changes else it will further create problems instead of removing it.

Changing .htaccess file

.htaccess is a file that stores the permalink structure of your site. This file manages the interaction of WordPress with its server and the way it generates URLs of the pages. If this file is not properly configured, the server will give the not found error message. In most of cases when .htaccess file is corrupt, you will not be able to access WordPress admin dashboard either. You will have to access your Cpanel and edit the file from there. This file is located in the Public_Html folder. Delete the file and you will be able to access your WordPress dashboard. But the problem has not yet gone. Go to setting>permalinks and click on “Save Changes”. WordPress will generate a fresh .htacess file and it will also be visible in your Cpanel, the location where you have recently deleted the file from. Congratulations you have now an error-free .htaccess file.

Problems with themes and Plugins

The 404 not found error may also be the result of an anomaly in the WordPress theme and/or Plugins. To troubleshoot the theme, rename your currently active theme. It will become inactive when you disable it. Your site will now be left with the WordPress default theme, twenty nineteen, etc. See if the error still exists? If it has gone, then the problem was with your theme. Consider updating or replacing it.

A corrupt Plugin may also lead to this problem. The Plugin which creates this problem or any other problem like this one is called a culprit Plugin. Here is how to identify the culprit Plugin. When you have identified the culprit Plugin, consider replacing it with an alternate Plugin if the support team of the Plugin did not provide sufficient support.

This was we knew about the 404 not found error message in WordPress. If you have applied all these steps and the problem still exists, kindly inform us so that we can together figure it out. We will be glad if we could provide you help. Also, give your valuable feedback in the comment section.

[/et_pb_text][/et_pb_column] [/et_pb_row] [/et_pb_section]
Engr. Rahamd Ullah
Engr. Rahamd Ullah
Articles: 83
Share This