If your WordPress homepage loads fine but every other page returns a 404, your rewrite rules are broken or missing. Go to wp-admin → Settings → Permalinks and click Save Changes without changing anything. That forces WordPress to regenerate .htaccess with the correct rewrite block. Most of the time, this fixes it immediately.
If a re-save doesn't fix it, the problem is usually that .htaccess isn't writable, isn't being read, or has been overwritten by something else. The sections below cover each case.
Why this happens
WordPress uses "pretty permalinks" like yourdomain.com/your-post-name/ instead of yourdomain.com/?p=123. Pretty URLs aren't real files or directories, so the web server needs a rewrite rule telling it "if this path doesn't exist as a file, hand it to index.php and let WordPress figure out what to serve." That rule lives in .htaccess on Apache (and LiteSpeed, which reads the same syntax).
The homepage still works without this rule because it's only index.php at the root, which the server finds directly. Every other URL depends on the rewrite rule to route through WordPress. When the rule is missing, wrong, or not being applied, you get a 404 from the web server itself, not from WordPress.
This is common after migrating a site, restoring from backup, or switching domains, since .htaccess often doesn't travel with a database export or gets skipped in a file transfer. If you recently moved this site to a new domain, also check changing your WordPress site's domain, since a mismatched site URL setting produces a similar symptom.
Re-save permalinks first
- Go to
wp-admin → Settings → Permalinks. - Leave the structure as it is (or pick
Post nameif none is set). - Click Save Changes.
WordPress rewrites .htaccess every time this page saves. This works as long as the file exists and is writable by WordPress. If you get a confirmation but the 404s continue, move on to checking the file directly.
Check .htaccess directly
Connect via FTP or open the file manager and look at public_html/.htaccess. It should contain a block that looks like this:
# BEGIN WordPress
RewriteEngine OnRewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]RewriteBase /RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]
Followed by # END WordPress. If the file is missing entirely, create it in public_html and paste that block in, then re-save permalinks to let WordPress confirm it. If the file exists but doesn't have this block, add it manually above any other rules.
Check permissions while you're in there. .htaccess should be writable (644 is standard). If it's locked down or owned by the wrong user after a restore, WordPress can't write to it even though the permalinks page reports success.
Post-migration and subdirectory cases
If this site was just migrated or restored from a backup, .htaccess frequently doesn't come along, since some backup tools treat dotfiles as hidden system files and skip them. Confirm the file actually exists in public_html before troubleshooting further, rather than assuming a plain misconfiguration.
If WordPress runs in a subdirectory rather than the site root, its rewrite rules only apply inside that subdirectory, and a rule ordering conflict with a static homepage can cause exactly this pattern. See installing WordPress in a subdirectory for how the rules should be scoped in that setup.
If you have shell access, wp-cli can flush rewrite rules without touching wp-admin:
cd /home/your-user/public_html
wp rewrite flush
This regenerates the same rules the Permalinks page would write, and is faster to script if you're fixing several sites at once after a bulk migration.
If the page loads but shows a blank screen instead
A 404 means the server can't find the page. If instead you're getting a blank white page with no error, that's a different problem, usually a PHP error being suppressed. See fixing the WordPress white screen of death. And if the homepage itself won't load at all, check fixing WordPress database connection errors first, since that's a more fundamental failure than a rewrite rule issue.
When to contact support
If you've confirmed .htaccess has the correct block, permissions look right, and permalinks still 404, open a ticket from the portal under Support → New ticket. This can happen if a server-level configuration is overriding your rewrite rules, which isn't something you can fix from the file manager. A real person will check the server config directly.