WordPress 404 Error on Posts and Pages: Fix
WordPress posts showing 404 but the homepage works? Run our free plain link test, then reset permalinks, check .htaccess or fix one missing post safely.

Last updated December 2, 2026
Your homepage loads, but every post or page shows “404 Not Found”. Your content is still in the dashboard, so where did it go?
Usually nowhere. WordPress just lost the rules that turn pretty links into posts. One quick test proves it.
This guide shows that test, then the fix for each pattern of 404 errors.
Key Takeaways
- Homepage works but posts 404? The permalink rules are usually broken, not your content.
- Test with the plain link, example.com/?p=123. WordPress says it works on all servers.
- Fix most cases by saving Settings, Permalinks without changing anything.
- On Apache hosts, check that .htaccess has the WordPress block.
- Only one post 404s? Check its status and slug instead.
Run the Plain Link Test
WordPress’s permalink documentation says the Plain permalink, example.com/?p=N, works on all server environments. That makes it a perfect test.
Plain link test builder
Find the post number in Posts, All Posts. Hover the title and look for post= in the edit link. Enter it below.
Digieh tool. Runs in your browser only. Nothing is sent to us.
Editor’s Note
This guide is accurate as of Digieh check. If the plain link loads and the pretty link shows 404, the rewrite layer is at fault, not your content. Most guides skip this test and go straight to fixes.
Spot an error in this article? Please contact us at support@digieh.com or read our Corrections Policy.
Find Your Fix
Now tell the finder which pages fail and what the test showed.
WordPress 404 fix finder
Answer two questions. The finder points to the layer that needs fixing. It runs in your browser only.
Digieh tool. Based on WordPress.org documentation, read December 2, 2026.
Which 404 Pattern Do You Have?
| Pattern | Likely cause | Fix first |
|---|---|---|
| Homepage works, all posts 404 | Permalink rules lost | Save permalinks |
| Only one post 404s | Draft, trash or changed slug | Check status, add redirect |
| Whole site 404s | Domain, hosting or server | Contact your host |
| New posts 404 after a plugin | Plugin rules clash | Deactivate, save permalinks |
Based on WordPress.org permalink documentation and WordPress developer docs on .htaccess. Patterns are Digieh’s reading.
How Do You Reset Permalinks?
This fixes most cases where the homepage works but posts do not.
- Log in to your WordPress dashboard.
- Go to Settings, Permalinks.
- Do not change anything. Just click Save Changes.
- Open a post in a private window to test.
Saving makes WordPress rebuild its rules. On Apache hosts, it also tries to update the .htaccess file.
Free updates
Join the Digieh list
Be the first to know when our weekly brief launches.
No spam. Unsubscribe anytime. Read our Privacy Policy.
How Do You Check the .htaccess File?
On Apache hosts, pretty links depend on a few lines in .htaccess. WordPress developer docs give the basic block:
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPressOpen the file in your host’s file manager, in the main WordPress folder. Make a copy before you edit it.
If the file is missing, create a new one named .htaccess with the block above. Then save Settings, Permalinks again so WordPress can check it.
Our WordPress 500 error guide explains how to repair a damaged .htaccess safely.
What caused your WordPress 404 errors?
- Permalink rules needed a save
- .htaccess problem
- A plugin
- One post was moved or deleted
- Not sure
Why Does Only One Post Show 404?
If the rest of the site works, the problem is that one post. Check these first:
- The post is in Draft, Pending or Scheduled status.
- The post was moved to Trash.
- Someone changed the slug, so the old link no longer exists.
- The post is private and you are logged out.
If the slug changed, add a redirect from the old link to the new one. Our page with redirect guide explains how Google sees redirects.
What If Your Host Uses Nginx?
Nginx servers do not read .htaccess files. Saving permalinks will not write server rules there.
WordPress docs say your host should set up the server for pretty permalinks. If posts 404 on Nginx, contact your host and ask them to check the WordPress rewrite rules.
Not sure which server you have? Your host’s control panel or support chat can tell you in seconds.
Some hosts run both, with Nginx in front of Apache. In that case .htaccess still matters, so check it too.
Managed WordPress hosts often handle rewrite rules for you. If saving permalinks does nothing, open a ticket with them.
Can a Plugin Cause 404 Errors?
Yes. Plugins that add custom post types, shops or translations add their own link rules. A clash can break posts.
- Deactivate the plugin you added or updated last.
- Save Settings, Permalinks again.
- Test a post in a private window.
- If it works, reactivate the plugin and save permalinks once more.
If the 404 returns after reactivating, contact the plugin’s support team with the steps you tried.
What Is a Permalink in WordPress?
A permalink is the permanent web address of a post, like yoursite.com/my-first-post. WordPress builds it from the structure you pick in Settings, Permalinks.
Behind the scenes, every post has a number. The pretty link is a friendly label that rewrite rules turn back into that number.
WordPress docs advise ending a custom structure with %postname% or %post_id%. That way, each link points to exactly one post.
Can Caching Cause 404 Errors?
Yes. A caching plugin or your host’s cache can save a 404 page. It may keep showing it after you fix the cause.
- Clear the cache in your caching plugin.
- Clear any host or server cache from your hosting panel.
- If you use a content delivery network, purge its cache too.
- Test again in a private browser window.
If the post loads after clearing caches, the fix already worked. The cache was just hiding it.
How Do You Find Every 404 on Your Site?
Google Search Console lists pages that return 404. Open Indexing, Pages and look for Not found (404).
- Check whether each link should exist.
- Fix or restore pages that were removed by mistake.
- Redirect old links that moved to a new address.
- Leave real dead pages as 404. That is the correct signal.
After fixing, use Validate fix in Search Console. Google then rechecks the affected pages.
How Do 404 Errors Affect Google?
Real 404s on pages that should exist can drop out of Google over time. Fix them quickly, then request indexing in Search Console.
Pages that show content but tell Google they are missing are a different issue. See our soft 404 errors guide.
Seeing “redirected you too many times” instead of a 404? Use our WordPress too many redirects guide.
Test Yourself
The plain link ?p=125 loads, but the pretty link shows 404. What is broken?
- The permalink rewrite rules
- The post content
- Your domain
WordPress says plain links work on all servers, so a working plain link proves the content exists.
Does saving Settings, Permalinks delete posts?
- No, it only rebuilds link rules
- Yes, it removes old posts
- Yes, it resets the theme
Saving permalinks rebuilds the rules that map links to posts. Content is untouched.
Frequently Asked Questions
Why do my WordPress posts 404 but the homepage works?
The permalink rules are usually lost. Save Settings, Permalinks to rebuild them.
Will changing permalinks hurt my search rankings?
Changing the structure breaks old links. Saving without changes is safe.
Where is the .htaccess file?
In the main WordPress folder on Apache hosts. It may be hidden in the file manager.
Why does a new post show 404?
A plugin or cache may be the cause. Save permalinks and clear the cache.
Should I switch to Plain permalinks?
Only as a short test. Plain links are not friendly for readers or search.
Conclusion
Run the plain link test first. If it loads, save Settings, Permalinks and check .htaccess on Apache hosts. If one post fails, check its status and slug. If the whole site fails, or the host uses Nginx, contact your host.
Editor’s Note
This guide is accurate as of December 2, 2026. We checked WordPress.org documentation and WordPress developer resources on permalinks and .htaccess on that date.
Spot an error in this article? Please contact us at support@digieh.com or read our Corrections Policy.
Keep exploring
Your next read is waiting
1AI & TechCan’t Log In to WordPress Admin: Loop Fix7 min read
2Visas & PassportsDS-160 Photo Size: The Rule Most Guides Miss7 min read
3AI & TechPlugged In, Not Charging: Laptop Fault or Feature?7 min read
4AI & TechPage With Redirect Status: When to Fix It7 min read
5AI & TechWindows 11 Camera Not Working: Error Code Fixes7 min read
6AI & TechFix Windows Update Error 0x80073712 Without Losing Files7 min readFound this useful?












