WordPress error 404

Wordpress error 404

The WordPress 404 error is one of the most common problems encountered online. However, this does not make it less boring or harmful when it appears on your own website. The good news is that solving the problem is relatively simple and the process is well documented for WordPress websites.

What Causes Error 404 Not Found on WordPress?

  1. A badly entered URL. In some cases, the error can be as simple as an extra letter typed in the URL of the page.
  2. Caching problems. Sometimes your browser may cache the page you are trying to access without being able to find it. So you'll always see the 404 error even if your site works for everyone.
  3. A problem with your Domain Name Server (DNS) settings. Your domain may not have been propagated to the DNS you are using. So you see the error when you try to access one of the pages of your site.
  4. Compatibility issues with WordPress. In some cases, issues with a plugin or theme may affect how WordPress generates URLs and permalinks for your website.

Wordpress error 404

Solutions to fix wordpress error 404

1. Modify .Htaccess

You must edit the .htaccess file (and add a code snippet at the top), which can be done in different ways. You can do this via edit mode of an FTP program or edit the file on your PC, then upload it to the server via FTP or you can do it via cPanel >> File Manager.

This is the code:

# BEGIN WordPress

RewriteEngine On

RewriteBase /

RewriteRule ^index.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

# End WordPress

2. Correct The Permalinks Structure

 You can also fix the '404 Not Found' error by correcting the permalinks of your WordPress site. Follow these steps:

  1. Log in to WordPress Dashboard.
  2. In the left navigation menu, click Settings, then Permalinks (take a look at the current setting.) If you are using a custom permalink framework, copy and save it somewhere.)
  3. Select Default.
  4. Click Save Settings.
  5. Return the settings to the previous configuration (before selecting Default). Put the custom structure back if you had one.
  6. Click Save Settings.