Knowledgebase

Fixing 404 Errors on Every Page Except the Homepage Print

  • wordpress, troubleshooting, errors, htaccess, permalinks, plugins, php, restore, filemanager, security
  • 0

If the homepage loads but every other page returns "Page not found", the rewrite rules are missing or broken — the content is fine.

1. Re-save permalinks

Go to Settings → Permalinks and click Save Changes without changing anything. This rewrites .htaccess and fixes it in most cases.

2. Check .htaccess is writable

If saving permalinks does not help, WordPress may not be able to write the file. In File Manager check that public_html/.htaccess exists and is set to 644, then try again.

3. Restore the default rules manually

Edit .htaccess and make sure it contains:

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

4. Check for conflicts

Redirect plugins, security plugins and caching plugins all write to .htaccess. If rules from several tools are stacked, remove the ones you no longer use and re-save permalinks.

If the site lives in a subfolder, RewriteBase and the final rule must both include that folder name.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot