WordPress 2 min read

The homepage works after a WordPress move. Why do other URLs 404?

Compare a broken WordPress page with its direct ID URL to distinguish missing content, permalink routing and URLs that need redirects.

The homepage works after a WordPress move. Why do other URLs 404?

Open one broken page in WordPress admin. If it’s missing or unpublished, start there. If it exists, compare its public permalink with the direct URL /?page_id=123, using the real page ID. A direct URL that reaches the page while the pretty URL fails points towards routing. Some setups redirect the direct URL to the permalink, so check the response chain before drawing a conclusion.

Find the pattern in three URLs

Try a page, a post and a product if there’s a shop. If they all 404 and the homepage works, compare the old and new permalink settings and check that the new web server sends those paths to WordPress. On Nginx, inspect the site configuration. An Apache rewrite file won’t tell you what Nginx is doing.

Separate a renamed page from a broken route

If only old addresses fail, see whether their content moved to a new path. Redirect each old address to its closest matching page and check that the destination returns 200. Start with URLs that still receive visits or have links pointing at them. Check the sitemap and internal links use the final addresses.

Check the response visitors are getting

Try the URL logged out and look for a cached 404. After fixing the underlying problem, clear the relevant cache entry and check the old address and final destination again. Test a URL you know should remain missing too.

If you’re working through a migration, send me one broken address and the URL you expected to replace it.

Need a hand with this?

Get direct help with a WordPress fault, a custom feature or the regular upkeep of your website.

Talk directly to Adam

Share this article

Back to Blog