404 Errors on WordPress When Accessing Pages, Posts, and Archives

If you're getting 404 links on various pages like certain posts or category archives, but the homepage is working, there is most likely an issue with your .htaccess file, which WordPress uses to rewrite URLs into "Pretty-Permalinks."

To fix this, simply "flush" your permalink settings with the following steps.

  • Log in to your WP Admin, @ yourdomain.com/wp-admin
  • Click on the "Settings" section in the left menu and choose "Permalinks"
  • Change the permalink settings to anything besides "Plain" and the option it's currently on
  • Click "Save Changes" and your pages should be working now.
  • If they are, you can change your permalink settings back to what they were initially.
  • If it's still not working, using FTP or your panel's File Manager, find the ".htaccess" file (you may need to enable "Show Hidden Files") and add the following lines to the end of the file:
# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress
  • Save the file, and try accessing your pages again.