WordPress Pages Returning 404 (Permalink Issue)

WordPress Pages Returning 404 (Permalink Issue) - MakeWPFast
Warning Frequency: Common
Error message: 404 Not Found — page exists but returns 404

One of the most common WordPress issues: your pages and posts exist in the database, but visiting them returns a 404 Not Found error. Only the homepage works. This is almost always a permalink/rewrite rule issue.

WordPress uses URL rewriting to create pretty permalinks (e.g., /my-post/ instead of ?p=123). If the rewrite rules are missing or corrupted, the web server can’t route requests to WordPress, and you get 404s.

Common Causes

  1. Corrupted or missing .htaccess file (Apache)
  2. nginx missing try_files directive for WordPress
  3. Rewrite rules need flushing after migration or plugin change
  4. mod_rewrite not enabled on Apache
  5. Custom post type rewrite rules not flushed after plugin activation

How to Fix It

  1. Flush permalinks: Go to Settings > Permalinks, don't change anything, just click Save Changes
  2. Check .htaccess: Make sure it contains the standard WordPress rewrite rules (Settings > Permalinks will regenerate them)
  3. For nginx: Add try_files $uri $uri/ /index.php?$args; in your server block
  4. For Apache: Ensure mod_rewrite is enabled: sudo a2enmod rewrite && sudo systemctl restart apache2
  5. For custom post types: Run wp rewrite flush via WP-CLI after activating CPT plugins

Diagnosing WordPress errors?

WP Multitool helps you find and fix performance issues, slow queries, and plugin conflicts without guesswork.

Try WP Multitool →
Get WordPress Performance Tips

Plugin reviews, speed optimization guides, and error debugging — straight to your inbox.

No spam. Unsubscribe anytime. We respect your privacy.