WordPress Posts Return 404 Not Found

Share
Workaround available Self-hosted WordPress (WordPress.org) Updated November 13, 2026Based on 3 user reportsHow we research

Quick answer

Posts or pages that return 404 while the homepage works are almost always a rewrite rules problem. Re-save Settings > Permalinks, then fix .htaccess or mod_rewrite.

Most likely fix: Flush rewrite rules

How to fix it

Try these in order — the most common fix is first.

  1. 1. Flush rewrite rules

    1. Settings > Permalinks, click Save Changes. This regenerates the rules.
    Did this fix it?
  2. 2. Restore the default .htaccess block

    1. If .htaccess is missing or damaged, replace it with the standard block: # BEGIN WordPress, <IfModule mod_rewrite.c>, RewriteEngine On, RewriteBase /, RewriteRule ^index\.php$ - [L], RewriteCond %{REQUEST_FILENAME} !-f, RewriteCond %{REQUEST_FILENAME} !-d, RewriteRule . /index.php [L], </IfModule>, # END WordPress.
    Did this fix it?
  3. 3. Ask your host about mod_rewrite

    1. Ask the host to enable mod_rewrite and AllowOverride All. On nginx the try_files rule in the server config must send requests to index.php.
    Did this fix it?
  4. 4. Custom post type 404s

    1. Rename any page whose slug matches the custom post type, switch Settings > Permalinks to Plain, save, switch back to your preferred structure and save again.
    Did this fix it?

Symptoms

The homepage loads but posts, pages or custom post types show 404 Not Found, often after migrating the site, changing permalinks or installing a plugin.

Why it happens

  • Stale rewrite rules
  • Missing or incorrect .htaccess
  • mod_rewrite disabled on Apache or missing rewrite rules on nginx
  • A custom post type slug clashing with a page name
  • Wrong file permissions on .htaccess

This guide also covers

  • wordpress 404 error posts
  • wordpress permalinks 404
  • wordpress pages not found
  • wordpress post 404 not found

Still not working?

If WordPress keeps failing, you're not alone. See every WordPress problem users report or the alternatives people switch to.

Done fighting WordPress? Our small team builds your own WordPress alternative, made for how you work. On your domain or hosted by us. Price agreed together.

Get a quote
Fixed it? Share this guide

The same problem in other apps

All not loading, error messages & connection guides →

Other WordPress errors

All 11 WordPress errors and fixes →