WordPress Posts and Pages Returning 404 (Homepage Works)
Your homepage loads fine, but every post or page gives "Page not found". The content is still there — WordPress has usually just lost the rules that turn pretty web addresses into the right page.
Common signs of this issue
- The homepage loads normally, but clicking any post, page, or category shows a 404 "Page not found" error.
- The posts and pages still appear in your WordPress dashboard under Posts and Pages, with all their content intact.
- It started right after moving the site to a new host, restoring a backup, or changing domain.
- It started after installing, updating, or removing a plugin — often one that adds a shop, events, portfolio, or other custom content.
- Ugly addresses like yoursite.com/?p=123 work, but the normal ones like yoursite.com/about-us do not.
- The 404 page looks like your host's plain server error rather than your theme's styled "not found" page.
Safe checks you can do yourself
None of these require sharing passwords with anyone.
- Try the one-click fix first: in WordPress go to Settings > Permalinks and click Save Changes without changing anything. This rebuilds WordPress's address rules and fixes a large share of these cases on its own.
- Test a post using its plain address. Find a post's ID number (hover over it in the Posts list and look at the link) and visit
yoursite.com/?p=ID. If that loads but the pretty address does not, the content is fine and the problem is the address rules. - Look at the style of the 404 page. If it is your theme's own design, WordPress is answering but cannot match the address. If it is a bare server page that mentions Apache, nginx, or LiteSpeed, the request is not reaching WordPress at all — which points to a server setting.
- Ask your host or developer whether the site's
.htaccessfile is present in the main folder. On Apache and LiteSpeed hosting this small file holds the rewrite rules, and it is easy to lose during a move because files starting with a dot are hidden by default. - If your host uses nginx, there is no .htaccess file. WordPress's addresses then rely on a server setting only your host can change, so a move to an nginx server is a common trigger. Ask them to confirm WordPress permalinks are supported on your account.
- Think about what changed. If the 404s began after a plugin update or removal, and only affect one type of content (products, events, team members), that plugin's own settings or a re-save of permalinks after updating it is the likely fix.
- Check Settings > General and make sure the WordPress Address and Site Address are the domain you expect. After a move, a leftover old domain can send links to the wrong place.
- In Google Search Console, the Pages report may show a jump in "Not found (404)". That confirms when it started and how many addresses are affected, which helps your developer.
What this usually means
WordPress stores your posts in a database and builds each page when someone asks for it. Friendly addresses like /about-us do not exist as real files, so the server needs a set of rewrite rules that say "send anything you don't recognise to WordPress". The homepage works without those rules, which is why it is the one page that keeps loading when everything else breaks.
The most common causes are a missing or overwritten .htaccess file after a migration or restore, a move to a server that uses nginx without the right configuration, Apache's rewrite module being disabled, or a plugin that changed the rules and left them stale. Re-saving permalinks fixes the last case immediately and sometimes the first. The server cases need your host.
This matters more than it looks. While posts are returning 404, Google sees pages that no longer exist, visitors from search hit dead ends, and contact or product pages may be unreachable even though your homepage looks healthy. The good news is that nothing has been deleted — once the rules are restored, every page comes back exactly as it was.
What not to do
- Don't delete and recreate the posts. They are not missing, and recreating them can change their addresses permanently.
- Don't change your permalink structure to a new format as a fix. It can make the error look solved while breaking every link Google and other sites already have.
- Don't edit or replace the .htaccess file yourself unless you know what is in it. Security and caching plugins add their own rules there, and losing them causes new problems.
- Don't install a redirect plugin to paper over the 404s. Redirects are for pages that have moved, not for broken address rules.
- Don't leave it for days. Search engines may start dropping the affected pages from results if they keep returning 404.
- Don't assume the move or restore failed completely. If the homepage and dashboard work, the content almost always transferred fine.
When to get help
If re-saving permalinks does nothing and the 404 page looks like a bare server error, it is time to contact your host — the fix is a server or rewrite setting on their side, and they can usually confirm it quickly. It is worth bringing in a developer when the problem started with a migration, only some content types are affected, or your host insists the server is fine. Someone who has untangled WordPress rewrite rules before can usually find the cause in minutes rather than hours of guessing.
Not sure what to do next?
Answer a few short questions and we'll point you to the safest next step — DIY, a freelancer, or a direct review. No passwords required.
Is this a business website? If this issue may be costing you leads, sales, or trust, you may want a direct review instead of trial and error.
Frequently asked questions
Why does my WordPress homepage work but other pages 404?
The homepage loads without any special address rules. Every other page relies on rewrite rules that send friendly addresses to WordPress. When those rules are missing or stale, only the homepage keeps working.
How do I flush permalinks in WordPress?
Go to Settings, then Permalinks, and click Save Changes without changing anything. That rebuilds WordPress's internal address rules and, on many hosts, rewrites the .htaccess file too.
Are my posts deleted?
Almost certainly not. If they still show in the dashboard under Posts and Pages, the content is safe. The site just cannot match the web address to the post.
Why did this start after moving to a new host?
The .htaccess file is often left behind because it is hidden, or the new host runs a different web server such as nginx that needs its own configuration. Either way it is an address-rules problem, not missing content.
Will this hurt my Google rankings?
A short outage will not do lasting harm. If posts return 404 for days or weeks, Google may start dropping them from results until they come back, so it is worth fixing promptly.
Only my product or event pages are 404. Why?
Those content types are usually created by a plugin. After that plugin is updated, reinstalled, or changed, its address rules may need rebuilding — re-saving permalinks or the plugin's own settings page normally sorts it out.