Symptoms
All pages of a WordPress site, except the index page, give 404 errors.
Description
WordPress uses permalinks to make sub-page URLs human-readable. The permalink configuration is set in the site's .htaccess
file. When the configuration is missing, the human-readable URLs give 404 errors.
Workaround
- Access the server's command line as the cPanel user via SSH or "Terminal" in cPanel.
- Open the site's
.htaccess
in your preferred text editor. - Add the following lines to the top of the file.
# 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 exit the text editor.
Comments
0 comments
Article is closed for comments.