Overview
A 404 (Page Not Found) error occurs when the requested page or resource cannot be found. In WordPress, this may be caused by incorrect permalink settings, missing website files, or incorrect .htaccess rewrite rules.
Before You Begin
Always create a full backup of your website files and database before attempting any of the troubleshooting steps below.
This article contains advanced troubleshooting instructions. If you are unfamiliar with these settings or unsure how to complete any of the steps, please contact our Customer Support team for assistance before proceeding.
Basic Troubleshooting
Before modifying your website files, check the following:
- WordPress installation: Ensure WordPress is installed correctly and the required WordPress core files are present.
- PHP compatibility: Ensure your hosting package is using a PHP version compatible with your WordPress installation, themes, and plugins.
Permalink settings: If you can access your WordPress dashboard, select Settings from the left-hand menu, then select Permalinks. Click Save Changes without changing your existing permalink structure. Check whether this resolves the issue.
If the issue persists, proceed with the advanced troubleshooting steps below.
Advanced Troubleshooting: Restore the Default WordPress .htaccess File
The .htaccess file contains configuration directives that control URL rewriting, redirects, and other website behaviours. A missing or incorrectly configured .htaccess file may contribute to WordPress 404 errors.
Step 1: Access Your Website Files
- Log in to your account.
- Select Products from the left-hand navigation menu.
- Select Hosting from the top toolbar.
- Locate your hosting package and click Control Panel.
- In Plesk, select Files.
- Navigate to your website's document root directory. This is typically named
httpdocsor may be named after your domain, such asexample.com.
Step 2: Back Up Your Existing .htaccess File
Locate your existing .htaccess file and rename it to .htaccess.bak.
If a file with this backup name already exists, use a different backup filename.
Do not delete the original file, as it may contain custom redirects, security settings, or other important configurations.
Step 3: Create a New .htaccess File
Create a new file named .htaccess in your website's document root directory.
Open the file using the File Manager's text editor and add the following standard WordPress rewrite rules:
# 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 WordPressSave the file.
Important: This configuration is intended for standard single-site WordPress installations located in the website's document root. It is not intended for WordPress Multisite installations, installations in subdirectories, or websites requiring custom rewrite rules.
For additional .htaccess configurations, refer to the official WordPress documentation:
https://developer.wordpress.org/advanced-administration/server/web-server/httpd/
Step 4: Test Your Website
Open your website and check whether the 404 error has been resolved.
Test your homepage, internal pages, and WordPress dashboard to ensure they are accessible.
If the Issue Persists
If replacing the .htaccess file does not resolve the issue or causes additional problems, restore your original configuration:
- Rename the newly created
.htaccessfile to.htaccess.test, using a different filename if one already exists. - Rename your original
.htaccess.bakfile back to.htaccess, if one existed.
If the issue persists after completing these troubleshooting steps, please contact our Customer Support team for further assistance.
Comments
0 comments
Article is closed for comments.