blog posts

How To Fix 404 Page Not Found Error In WordPress

  1. Refresh Permalinks

Navigate to Settings > Permalinks in your WordPress dashboard and click Save Changes to refresh your permalinks. This simple step often rectifies the problem.

  1. Update .htaccess File

Access your .htaccess file, usually located in your WordPress root directory. Ensure it contains the default WordPress rewrite rules provided below. These rules are crucial for proper URL handling and can significantly impact your site’s accessibility and SEO performance.

copy past this code in .htaccess file

# Force SSL

RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

# BEGIN WordPress

RewriteEngine On RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]

# END WordPress

Save the changes and upload the file back to your server.

3. Deactivate Plugins

Temporarily deactivate all plugins via Plugins > Installed Plugins. By doing so, you can identify whether a plugin is causing the 404 error. Activate plugins one by one to pinpoint the culprit.

4. Switch to Default Theme

Switch to a default WordPress theme like Twenty Twenty-One under Appearance > Themes. This step helps determine if the error stems from your current theme.

5. Restore Backup

In case other methods fail, restore your site from a recent backup using your preferred backup plugin or hosting provider’s backup service.

Leave a Reply

Your email address will not be published.