SEOSTUDIO™

Why do my WordPress posts return 404 when the homepage works?

Test a confirmed published post using both its public URL and /?p=ID. If the ID route succeeds and the pretty URL fails, refresh existing permalink rules on staging. If that does not help, ask the host to confirm the new server passes WordPress routes to the application.

What does the problem look like?

The dashboard and homepage load, but several published posts fail after a migration or server change. A single missing article can instead be a bad link, changed slug, or incorrect publication state.

Before you make changes

Record the current permalink format and back up the database and server configuration. Use protected staging and ask the hosting owner to handle server changes.

Step-by-step troubleshooting

  1. Find two known good posts

    Copy the current public link and post ID for each published post. Load the links while signed out and record the final responses.

  2. Compare the ID route

    Request /?p=ID under the same site base. Check whether it shows the content or redirects. If it redirects to the broken path, the comparison is inconclusive.

  3. Save the existing setting on staging

    In Settings → Permalinks, save the selected format without changing it. Retest both posts.

  4. Ask the host to trace the failing route

    Report a working URL and failing URL. Ask the host to verify the rewrite method for its web server, especially after changing platforms.

  5. Repair genuinely moved links

    If the only failure is an old URL with an actual replacement, use the documented redirect method and update internal links.

Worked example

A neighborhood news site migrates its archive. The homepage loads, but /news/farmers-market/ and another active post are missing. The host traces the new server’s request and corrects its routing. A real post loads and a made-up URL still returns 404.

Common mistakes

  • Changing the URL format during diagnosis.
  • Pasting configuration for an unrelated web server.
  • Using a homepage redirect for every unknown path.

Verify the fix and plan a rollback

How to verify the fix

Test a public post, a second post, a static page, and a nonexistent URL while signed out. Inspect the final URL and HTTP status for permanent redirects separately.

If the change fails

Restore the recorded format and the changed routing configuration if unrelated URLs break. Ask the host to revert the scoped deployment before taking a larger snapshot restore.

Practical follow-up questions

Can a plain ID test distinguish a missing post from a routing fault?

A successful ID response supports the existence of that post. A redirect or a second failure needs more evidence. Check the actual final URL and the publication state.

Where is the ID in the WordPress editor?

The editor’s URL typically includes a numbered post parameter. Use that value from a known published post rather than a number guessed from its slug.

Why do articles work on staging but fail on the new host?

The servers can apply different routing or cache rules. Share both environments’ paths and the exact failing response with the host.

Do I need to edit .htaccess on Nginx?

Nginx does not read Apache .htaccess files. Ask your host to verify the relevant location and routing configuration for the site.

How do I prove a link is stale after a title change?

Copy the published link from the post editor and compare the complete path with the reported URL. A title change by itself may leave the old slug in place.

Can a maintenance page make a route look like it works?

Check the actual response body and status. A splash page displaying a 200 says little about whether the intended article route renders correctly.

Why can a host report no incoming request while I get a 404?

A fronting cache or proxy may be serving the response. Capture the exact URL, time, and cache headers before requesting a trace.

Should I preserve old URLs if I changed the date pattern?

Map indexed or linked article URLs to their specific replacements. Update internal links and test a sample of redirects through to the intended content.

What if only pages under one folder are affected?

Compare a working path with a failing sibling. Ask the host to check overlapping route or directory rules for the affected public prefix.

What status should a genuinely removed post return?

If there is no appropriate replacement, a clear not-found response is an acceptable outcome. Verify that the template sends the expected HTTP status.

Free tools and website checks

Frequently asked questions

Will re-saving permalinks change my post titles?

It refreshes routing for the selected URL structure. It should not edit post titles. Test on staging before changing production.

Can I test public links without logging in?

Yes. A signed-out browser helps distinguish actual published content from a privileged preview.

When should I involve the host?

If multiple valid paths fail and refreshing WordPress rules leaves the result unchanged, share working and failing paths and the migration timeline.

Official references and scope

Installation paths, hosting rules, proxies, and multisite can change route behavior. Work with your hosting administrator for server-level changes.

Sources checked

Related guides