View Categories

Reading Time: 2 min read

Fixing the 404 Page Not Found Error in WordPress #

Fixing the 404 Page Not Found Error in WordPress, If you’ve been running a WordPress site for some time, you’re likely familiar with the 404 Page Not Found error. This error appears when navigating the inner pages of your site from the homepage.

The 404 Page Not Found error is one of the most frequent issues and typically arises:

  • after moving a new website, or
  • when you change the rules in the .htaccess file.

We have provided solutions for both of these issues.

I. Creating an .htaccess File: Fixing the 404 Page Not Found #

1. Sign in to your control panel and access the File Manager.

2. Navigate to the folder containing your WordPress site to find the /wp-content/ and /wp-includes/ directories.

Note: Make sure to enable the show hidden files option in Settings.

3. Locate and edit the .htaccess file within that folder.

Fixing the 404 Page Not Found

4. Insert the following code.

# BEGIN WordPress

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

# End WordPress

If the directory lacks a .htaccess file, create one there.

5. Press the +File button at the top-right of the dashboard.

Fixing the 404 Page Not Found

6. Type .htaccess in the New File Name field and click the Create New File button.

7. Open the file and paste the provided code into it.

This should resolve the 404 Page not found error in most instances.

Note: This issue typically arises after moving or migrating a website from a different domain or location.

II. Update the Permalinks Structure #

1. Log in to the WordPress Dashboard using the Admin account.

2. Navigate to Settings and select Permalinks.

3. Choose Post name and click Save Changes.

This will revert your permalink structure to the default setting.

WordPress will then automatically update the .htaccess file, resolving the website’s 404 Requested URL not found error.