If a WordPress post URL returns a 404, the post may still exist: pretty URLs depend on rewrite rules that route the request to WordPress. Start with Settings → Permalinks → Save Changes. If that does not restore the page, identify the web server and check its rewrite configuration—or ask your host to check it.
First, find out how widespread the 404 is
Test two or more affected post URLs, then compare them with the homepage and a WordPress admin page. Note whether the problem affects every pretty permalink, just one post, or only a REST API URL such as /wp-json/. A single missing post and a site-wide routing failure call for different investigations.
- Many post URLs fail: rewrite handling is a likely place to investigate, particularly if the problem began after a permalink or server-configuration change.
- Only one post fails: check that post’s URL and whether the post is available at that address before changing server settings.
/wp-json/also fails: record that symptom too; it can accompany a pretty-permalink routing problem, but does not prove that routing is the cause.
A pretty-permalink 404 does not by itself mean the post is gone. WordPress lists disabled Apache mod_rewrite as one possible cause. WordPress’s troubleshooting FAQ also recommends resetting permalinks as an initial check.
Reset WordPress’s permalink rules
- In the WordPress dashboard, open Settings → Permalinks.
- Click Save Changes. You can save the existing structure; this step is intended to refresh the permalink rules.
- Open an affected post URL again. If it still returns 404, continue to the server checks below.
Saving the settings is a useful WordPress-level diagnostic step, not proof that the web server is configured to apply the rewrite rules. WordPress’s permalink documentation explains the setting; its common-errors guide advises checking the server setup if resetting permalinks does not resolve pretty-permalink 404s.
#1 Best Overall
Identify the server handling the site
Check your hosting control panel or ask your provider whether requests are handled by Apache, Nginx, or a proxy in front of another server. A site can have multiple layers, so the configuration that matters is the one handling the failing request. An Apache .htaccess edit will not repair a request served by Nginx.
| Check | Apache | Nginx |
|---|---|---|
| Rewrite mechanism | mod_rewrite and permitted .htaccess rules |
Rules in the active Nginx server configuration; Nginx does not read .htaccess |
| First WordPress check | Save permalink settings | Save permalink settings |
| Where configuration is handled | Apache module, virtual host, or applicable directory configuration | Nginx server configuration, often managed by the host |
| When to escalate | You cannot verify or change the module or override settings | The configuration is host-managed or you cannot identify the active server block |
These distinctions are reflected in WordPress’s server troubleshooting guidance and in WordPress support discussion of Nginx. Support reports illustrate particular deployments; they are not universal configuration recipes.
Rank #2
Check the rewrite configuration for the active server
If the site uses Apache
Confirm that mod_rewrite is enabled and that Apache is allowed to read the relevant .htaccess directives. WordPress provides an example rewrite block in its permalink documentation, but the correct base path and virtual-host settings depend on the installation. A subdirectory site or a host with custom Apache settings may need different configuration.
If the site uses Nginx
Do not try to fix Nginx by editing .htaccess: Nginx does not process that Apache file. The active Nginx configuration must route requests that are not existing files or directories to WordPress. A WordPress support report shows a try_files approach in a specific setup, but its configuration should not be pasted into an unrelated server block.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Rank #3
If a proxy or multiple servers are involved
Ask which layer receives the request and where routing to WordPress is configured. The right fix depends on that deployment; there is no single proxy configuration that applies to every site.
Use a 404 at /wp-json/ as a clue, not a diagnosis
If the REST API root also returns 404, pretty-permalink routing may be involved. The WordPress REST API Handbook recommends considering pretty permalinks; with non-pretty permalinks, a REST route can be supplied using the rest_route query parameter, for example ?rest_route=/ for the API root.
Rank #4
A failing individual REST endpoint may instead reflect a route or path that does not exist. Check the exact URL and endpoint before treating every REST API 404 as a server rewrite failure.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.When to contact your host or administrator
If you cannot access or safely verify the server configuration, stop before editing files or server blocks and contact the hosting provider or server administrator. WordPress specifically advises asking the host for help if you are unfamiliar with editing .htaccess. WordPress’s common-errors guide covers that escalation.
Free tools Windows power users keep installed
One-click scans. No signup required.
Best Value
Include the affected post URL, the permalink structure, whether the homepage and admin work, the server type if known, and whether /wp-json/ also returns 404. This gives support the details needed to check the appropriate rewrite layer.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

