WordPress shows 404 on every page except the homepage

The homepage loads, but every post and page says "Not Found". Your content is still there. The server has stopped passing pretty links to WordPress.

What to do, in order

  1. Re-save permalinks. In the dashboard, go to Settings, Permalinks, and press Save Changes without changing anything. This rewrites the rules. It fixes most cases.
  2. Check the .htaccess file (Apache hosts). In the site's main folder it should contain the block that starts # BEGIN WordPress and ends # END WordPress. If the file is missing or empty, the permalink save will recreate it when the folder is writable.
  3. Moved to a new host or server? Apache needs AllowOverride All for the site folder and mod_rewrite switched on (sudo a2enmod rewrite, then restart Apache).
  4. nginx server: nginx ignores .htaccess. The site block needs try_files $uri $uri/ /index.php?$args; inside location /.
  5. Quick test: set permalinks to "Plain". If pages load with ?p=123 links, the rewrite rules are the only problem.

If none of that brings the pages back, send me the address and I will check which links fail and why.


Want the rest of your site checked after it is back? Run a free 40-point check at tinkeraudit.com.