Nginx 404 WordPress Permalink Checklist

halfbrain_logo512adminJune 13, 2026
3 lượt xem

Nginx 404 WordPress Permalink Checklist

WordPress 404 errors on Nginx often come from missing try_files rules, wrong root path, broken permalink settings or a server block pointing to the wrong directory. This checklist helps isolate the cause.

Common causes

  • Nginx server block missing WordPress try_files rule.
  • Wrong root path.
  • Permalink settings not saved.
  • Wrong domain server block is being used.
  • Cache still shows old URLs.
  • WordPress page or post slug changed.

Checklist

  1. Check if only pretty permalinks are broken.
  2. Open a direct query URL if needed.
  3. Check WordPress permalink settings.
  4. Resave permalinks.
  5. Check Nginx root path.
  6. Check server_name.
  7. Verify try_files rule for WordPress.
  8. Run nginx -t.
  9. Reload Nginx.
  10. Clear cache and test again.

Final check

The issue is fixed when posts, pages, categories and custom URLs load correctly without breaking the homepage.

Checklist Type Troubleshooting
Level Beginner
Risk Level Medium Risk
Estimated Time 20–45 minutes

When to Use This Checklist

Use this checklist when WordPress pages or posts return 404 on an Nginx VPS while the homepage may still work.

Required Tools

WordPress admin, SSH access, Nginx server block, cache plugin, domain access

Before You Start

Before editing Nginx config, save a copy of the current server block so you can roll back quickly.

Structured Checklist Steps

  1. Check if homepage works.
  2. Check if posts return 404.
  3. Resave permalinks.
  4. Check Nginx root path.
  5. Check server_name.
  6. Verify try_files rule.
  7. Run nginx -t.
  8. Reload Nginx.
  9. Clear cache.
  10. Test pages and posts.

Rollback Plan

If the new Nginx rule breaks the site, restore the previous server block and reload Nginx after passing nginx -t.

Common Mistakes

  • Using Apache .htaccess logic on Nginx.
  • Wrong root path.
  • Forgetting to resave permalinks.
  • Reloading Nginx without testing config.
  • Editing the wrong server block.

Related Commands

sudo nginx -t
sudo systemctl reload nginx
curl -I https://example.com/sample-post/
sudo nano /etc/nginx/sites-available/example.com
try_files $uri $uri/ /index.php?$args;

Share:

Disclaimer: The guides, checklists, commands, and examples on HalfBrain.net are provided for educational and operational reference only. Server environments, hosting providers, software versions, security settings, and WordPress configurations can vary, so you should always review commands before running them on your own system. We do our best to keep the content accurate and useful, but we cannot guarantee that every command, configuration, or recommendation will fit every environment. Always back up your website, database, and server configuration before making changes. HalfBrain.net is not responsible for data loss, downtime, security incidents, misconfiguration, or other issues that may result from applying the information on this website. Use the material at your own discretion.

Leave a Reply

Your email address will not be published. Required fields are marked *