QAlaunch

All WordPress pages return 404 except the homepage

When only the homepage works and every other WordPress URL returns 404, the web server is not passing pretty permalinks to WordPress. Start by opening Settings > Permalinks and clicking Save Changes without editing anything, which rewrites the rules. If that does not help, the .htaccess file is missing or ignored on Apache (AllowOverride and mod_rewrite), or the Nginx config lacks the try_files line that sends requests to index.php.

Opens your site in a real browser on desktop and phone. Free, about two minutes, no signup. Full report from $19.

What you'll see

The home page displays normally, but clicking any menu item, post or category gives a 404 page, often the host’s plain one rather than your theme’s. It usually starts straight after a migration, a host change, pushing staging live or changing the permalink structure. URLs in the ?p=123 format still work.

Why it happens

1. Rewrite rules were not regenerated

WordPress keeps its permalink rules in the database and writes them out when permalinks are saved. After an import those rules can be stale or tied to the old path, so every pretty URL misses.

2. The .htaccess file is missing or ignored

On Apache, the default WordPress block in .htaccess routes requests to index.php. Many migrations skip hidden files, and some servers are configured with AllowOverride None or without mod_rewrite, so the file is present but never read.

3. Nginx has no WordPress rule

Nginx ignores .htaccess completely. Without try_files $uri $uri/ /index.php?$args; in the server block, it looks for a real folder called /about/ and returns 404 when none exists.

4. Stored paths still point at staging

If the site lived in a subfolder such as /staging/ before, internal links and some plugin settings may still include that path, so links lead to URLs that genuinely do not exist on the live site.

How to fix it

  1. In wp-admin go to Settings > Permalinks and click Save Changes. You do not need to change the structure; saving flushes and rebuilds the rewrite rules. Test an inner page straight away.
  2. On Apache hosting, open the WordPress root folder (the one with wp-config.php) and make sure .htaccess exists and contains the standard block that begins # BEGIN WordPress. If it is missing, create it with that block or let WordPress write it by saving permalinks again with the file writable.
  3. If .htaccess is correct and pages still 404, ask the host to confirm mod_rewrite is enabled and that the site’s directory uses AllowOverride All. On a VPS you can check this yourself in the Apache virtual host file.
  4. On Nginx, ask the host (or edit the server block yourself) to add try_files $uri $uri/ /index.php?$args; inside the location / block, then reload Nginx.
  5. Back up the database and run a serialization-safe search and replace for any old staging domain or subfolder path, then re-save the menus under Appearance > Menus.

How to check it's fixed

  • Click through every main menu item, a few posts, a category archive and page 2 of the blog. Each should load with your theme, not a 404.
  • Visit a made-up URL like /this-does-not-exist and confirm your theme’s 404 template appears, which shows WordPress is now handling requests.
  • Check the browser’s Network tab shows a 200 status for real pages rather than a 404 with content.

What a QAlaunch scan shows for this

  • Navigation and on-page links that return 404, which is exactly how this fault looks from outside.
  • How the site responds to a deliberately missing path, so you can tell a server 404 from your theme’s 404 page.
  • The free scan covers the homepage only, which is the one page that works here; its link check is what exposes the broken inner pages.

See exactly what a full report contains in the sample report.

Frequently asked questions

Why does the homepage work when nothing else does?

The homepage is served by index.php directly, so it needs no rewriting. Every other pretty URL depends on rewrite rules to reach index.php, and that is the part that broke.

Will switching permalinks to Plain fix it?

It will make pages load because plain ?p= URLs need no rewriting, but it changes every URL on the site, breaks existing links from Google and other sites, and hides the real server problem. Fix the rules instead.

Can a plugin cause this?

Occasionally a plugin that registers custom post types or translations leaves stale rules behind after a move. Saving permalinks fixes that case too, which is why it is always the first step.

Done for you · not automated

Rather have a QA engineer test it by hand?

If this is a site you're launching or handing to a client, I'll go through it by hand, including the WordPress-specific issues a scan can't reach, like logged-in flows.

$299one-time · 3 business days
  • Up to 10 key pages tested by hand, not a scan
  • Every flow a customer uses: forms, sign-up, checkout, booking
  • Real mobile and desktop browsers
  • A written report in plain language, with screenshots
  • A 15-minute call to walk you through it
  • 10 years of professional QA experience

Tell me about your site and I'll reply personally, usually the same day.

No payment now. I'll confirm scope and price first.

More for WordPress: all WordPress fixes · WordPress testing · why WordPress breaks after updates · why contact forms fail silently

Written by Waqas Ahmad, QA engineer with 10 years of professional testing experience. Last checked October 26, 2026.

Sources: Akamai community: all pages except homepage 404 after migration · WP Staging: page not found after pushing · DreamHost: guide to WordPress 404 pages