Here’s a classic WordPress puzzle: your homepage loads fine, but every other page returns a 404 Not Found. It looks like your content vanished, but it’s really a permalink and rewrite-rules problem, and it’s usually a two-minute fix.

The one-click fix that works most of the time

WordPress generates rewrite rules that translate pretty URLs like /about-us/ into something the server understands. When those rules get lost — after a migration, a plugin change or an .htaccess edit — every non-home page 404s. To regenerate them:

  1. Log in to WordPress and go to Settings → Permalinks.
  2. Don’t change anything. Just click Save Changes.

That single save rewrites the rules and, nine times out of ten, every page springs back to life.

If that didn’t work: check .htaccess

The save above needs to write to your .htaccess file, and if that file isn’t writable, the fix won’t stick. In cPanel File Manager, open .htaccess in your site root (enable Show Hidden Files first). It should contain the standard WordPress block:

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

If it’s missing, paste this in and save. If the file’s permissions are wrong (they should be 644), fix them so WordPress can write to it.

Confirm mod_rewrite is available

Pretty permalinks rely on Apache’s mod_rewrite module. On our servers it’s enabled by default, so this is rarely the issue — but if you’ve moved from another host it’s worth ruling out. If the standard block is present and permalinks still 404, get in touch and we’ll check the server config.

Watch out after migrations

This 404 pattern shows up most often right after moving hosts, because the .htaccess didn’t come across or got overwritten. Make re-saving permalinks a routine step at the end of any migration and you’ll head off the problem before it starts.

Was this article helpful to you?

admin

Leave a Reply

You must be logged in to post a comment.