Client Problem: The website homepage loads correctly, but opening any inner pages or posts results in a "404 Not Found" error.
Cause: The .htaccess file is missing, corrupted, or lacks the standard WordPress rewrite rules needed for custom permalinks.
Technical Solution Steps:
Log in to cPanel: Access your cPanel account using your login credentials.
Access File Manager: Navigate to Files > File Manager and open the
public_htmldirectory (or your domain's root folder).Show Hidden Files:
Note: if .htaccess is not visible then..
Click Settings in the top-right corner, check Show Hidden Files (dotfiles), and click Save.Recreate .htaccess File: If
.htaccessexists, rename it to.htaccess_old. If missing, click + File, name it.htaccess, and add the default WordPress rewrite rules:Apache# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPressReset Permalinks in WordPress: Log in to your WordPress dashboard, go to Settings > Permalinks, and click Save Changes without changing anything to refresh rewrite rules.