WordPress Posts Returning 404 Errors: The 2-Minute Fix (2026)
Disclosure: some links on this page are affiliate links. We may earn a commission at no extra cost to you. How we test and rate hosts.
Diagnostic: homepage loads, wp-admin works, but every post and page returns 404. Your content isn't gone - WordPress lost the rewrite rules that map pretty URLs to database entries. One click fixes it 90% of the time; the other 10% is a missing .htaccess or an Nginx server that ignores it.
Fix 1: Re-Save Permalinks (Solves 90%)
- 1.wp-admin > Settings > Permalinks
- 2.Don't change anything - just click Save Changes
- 3.Reload a post that was 404ing
Saving flushes and rewrites the routing rules. Fixed? Done. Still 404? Your .htaccess file is missing, empty, or unwritable - keep going.
Fix 2: Check .htaccess
Via FTP or your host's File Manager, open .htaccess in the site root. It should contain the default block:
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]
File missing? Create it with those rules, permissions 644. File exists but empty or mangled? Replace contents, then re-save permalinks. WordPress can't write the file itself (permission denied on save)? Temporarily chmod 666, save permalinks, then back to 644.
Fix 3: Are You on Nginx?
.htaccess is Apache-only. If your host runs Nginx (check hosting panel or ask support), it ignores .htaccess completely - rewrite rules must live in the server config. Open a ticket: "Please add the standard WordPress Nginx rewrite rules (try_files $uri $uri/ /index.php?$args) to my server block." Most managed WordPress hosts configure this correctly out of the box, so an Nginx 404 usually means a migration put you on a bare server.
Fix 4: Plugin or Post Type Conflicts
Only some URLs 404 - like every /portfolio/ page? That's a custom post type problem: the plugin registering it was deactivated, or its slug changed. Re-activate the plugin or re-save permalinks after reactivating. Started right after installing a plugin? Deactivate it via FTP (rename its folder in wp-content/plugins), re-save permalinks, retest.
Prevent It After Migrations
Post-migration 404s happen because .htaccess didn't make the trip. Always verify it after moving hosts, and re-save permalinks as a post-migration checklist item. Full process: migration mistakes to avoid. If your URLs also broke into redirect loops, see ERR_TOO_MANY_REDIRECTS fix.
Tired of Debugging Server Quirks?
Bluehost runs managed Apache configs where permalinks just work - $3.99/mo, free domain, 24/7 phone support when a rewrite rule still fights back.
Get Bluehost from $3.99/moWhat are you building?
Tell us about your project so we can match the perfect hosting plan.
Hosting Cost Calculator
See exactly how much you'll spend on hosting over time. Compare Bluehost vs popular alternatives and discover your potential savings.
Used to calculate transaction fees (Shopify charges 2% on sales)
Frequently Asked Questions
Why do my WordPress posts suddenly show 404?
The rewrite rules that map URLs to posts got corrupted or deleted - most often the .htaccess file was wiped during a migration, a host change, or a plugin that flushes rules incorrectly. The posts still exist in the database; WordPress just can't route URLs to them.
What's the fastest fix?
Go to Settings > Permalinks and click Save Changes without modifying anything. This regenerates the rewrite rules and fixes 90% of cases in one click.
What if I can't access wp-admin at all?
That's a different problem - a sitewide 404 on every page including /wp-admin points to a missing/corrupted .htaccess or a server-level issue, not just permalinks. Recreate .htaccess manually via FTP with the default WordPress rules.
Only one post type returns 404 - why?
A custom post type 404ing while regular posts work means a plugin/theme changed its rewrite slug or was deactivated. Re-save permalinks first; if it persists, check the plugin registering that post type and any recently changed taxonomy settings.
Does this happen after migrating hosts?
Very often. The .htaccess file isn't always copied, and some hosts use Nginx (which ignores .htaccess entirely). On Nginx you must ask the host to add WordPress rewrite rules to the server config.
Will changing my permalink structure hurt SEO?
Yes - changing the structure changes every URL. Only re-save the existing structure. If you must change structures, set up 301 redirects from every old URL or you'll trade a temporary 404 problem for a permanent one.
Ready to launch?
Get Bluehost from $3.99/month with a free domain, free SSL, and 30-day money-back guarantee.
Related Articles
Bluehost vs Competitors: The Technical Deep Dive
We ran 47 benchmarks over 90 days. Here's the raw data on why Bluehost dominates.
Fix ERR_TOO_MANY_REDIRECTS in WordPress (2026): The 6 Real Causes
ERR_TOO_MANY_REDIRECTS means an infinite redirect loop. Match your Site URLs, fix Cloudflare SSL mode, reset .htaccess, kill plugin conflicts - step-by-step with code.
WordPress 403 Forbidden Error: 7 Fixes That Actually Work (2026)
403 means the server understood you but refuses to serve the page. Fix file permissions (755/644), regenerate .htaccess, kill security plugin blocks - in the right order.
Fix 502 Bad Gateway in WordPress (2026): Diagnose First, Then Fix
502 means the gateway got a bad response from your server - usually PHP timeouts, CDN issues, or overload. A 9-step diagnostic workflow from browser checks to server logs.
Fatal Error: Maximum Execution Time Exceeded - 6 Fixes (2026)
max_execution_time kills slow updates at 30-60s. Fix the culprit plugin/theme first, then raise the limit via wp-config, .htaccess or php.ini - with exact code.
HTTP Error Uploading Images in WordPress: 9 Fixes Ranked (2026)
The vague 'HTTP error' on image upload usually means memory limits or Imagick. Fix order: rename the file, bump memory, force GD library, check permissions - with code.