iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Antihost offers managed WordPress hosting with free migration, one-click staging and a 14-day free trial.
When a WordPress home page works but post, page, archive, REST, or admin URLs return 404 on Nginx, the usual cause is routing: Nginx is not sending unknown paths to WordPress’s index.php. Nginx does not read .htaccess, and WordPress cannot create Nginx rules for you. Put the fallback in the active server block, make the document root and PHP-FPM mapping agree, test with nginx -t, reload, then flush WordPress’s permalink rules if necessary.
What an Nginx WordPress rewrite problem actually is
Apache-based WordPress tutorials often tell you to edit .htaccess. That advice does not apply to Nginx. There is no per-directory .htaccess-equivalent that Nginx reads, and WordPress cannot modify Nginx’s server configuration automatically. Pretty URLs therefore depend on the Nginx configuration loaded for the hostname.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsA request for a real file, such as a CSS file or an image, should be served directly. A request for a virtual path, such as /news/my-post/, has no matching file on disk and must be internally routed to WordPress. WordPress then examines the path and resolves the post, page, archive, REST endpoint, or other resource. If the Nginx location ends with a hard 404, points at the wrong root, or never reaches PHP-FPM, the WordPress code never gets the opportunity to resolve that URL.
The same distinction explains why Plain permalinks can appear to work while Post name fails. A Plain URL contains a query string such as ?p=123; it can reach index.php without a virtual-path fallback. Post name and other pretty structures require the fallback.
#1 Best Overall
- Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
- With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
- Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
- Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
- Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.
The standard single-site configuration
Place this pattern in the server {} block that actually answers the site’s hostname. Set root to the directory that contains WordPress’s index.php; do not use a parent directory merely because it contains other files.
server {
server_name example.com;
root /var/www/wordpress;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ .php$ {
include fastcgi.conf;
fastcgi_pass unix:/run/php/php-fpm.sock;
}
}
try_files checks candidates in the order written. First it tests whether the requested URI maps to an existing file ($uri) or directory ($uri/) under the active root. If neither exists, Nginx internally redirects the request to /index.php?$args. The final $args preserves the original query string, which matters for query-based requests, tracking parameters, and some application endpoints.
The PHP location is a separate responsibility. It must pass the internally selected script to the PHP-FPM instance that serves this site. Distribution packages use different socket names and paths, so replace the example socket with the one installed on your server. If your included FastCGI file does not define SCRIPT_FILENAME, add a parameter that resolves to the real script path, commonly $document_root$fastcgi_script_name, and confirm the result in the effective configuration.
Rank #2
- Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
- Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
- Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
- Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
- Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
Why the fallback works
Existing files and directories stay static
A request for /wp-content/uploads/2026/10/photo.jpg is checked against the filesystem first. When the file exists, Nginx serves it without invoking WordPress. The same first-pass behavior applies to directories. This keeps static assets out of PHP and prevents the front controller from handling requests that have a real file behind them.
Unknown paths become WordPress requests
When no file or directory matches, the last try_files argument performs an internal redirect. The browser still shows the requested pretty URL, while PHP receives index.php and WordPress receives the original path information needed to select the correct content.
The active root controls every test
Nginx constructs the paths checked by try_files from the current root (or alias, where one is used). A syntactically perfect fallback still fails if that mapping points at an empty directory, an old release, or a parent directory that does not contain the WordPress files. Check the filesystem path and the loaded root together.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #3
- 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
- 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
- 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
- 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
- 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
A diagnostic procedure that isolates the fault
Work from the request entry point toward PHP. Change one layer at a time, and test a known URL after each change.
- Identify the answering server block. Confirm the requested hostname, listen ports, TLS configuration, and
server_name. A rule in a different virtual host has no effect, even if the edited file looks correct. Check for a default or competing block that could be selected first. - Dump the complete loaded configuration. Run
sudo nginx -Twhen your Nginx build supports it. This tests the configuration and prints included files, allowing you to search for duplicatelocation /blocks, regex PHP locations,try_files,rewrite,root, andaliasdirectives. This is often the fastest way to discover that the file you edited is not included. - Verify the document root. In the selected server block, confirm that
rootis the directory containingindex.php. Check the same path on disk and make sure the Nginx worker can traverse the directories and read the files. - Inspect the fallback URI. A root installation normally ends in
/index.php?$args. A site published below a prefix must end in the prefixed script, such as/blog/index.php?$args. A fallback to the wrong prefix sends every pretty URL to a script that is not where Nginx expects it. - Check PHP handling. Confirm that the regex PHP location is being selected, that
fastcgi_passnames a live PHP-FPM socket or address, and thatSCRIPT_FILENAMEresolves to the actual script. A rewrite can be correct while PHP still returns a 502, a “File not found” response, or a downloaded source file because the gateway mapping is wrong. - Test syntax and referenced files. Run
sudo nginx -t. Nginx checks syntax and attempts to open files referenced by the configuration. Do not reload a configuration that fails this test; fix the reported file and line first. - Reload only after a successful test. Use
sudo nginx -s reload, or the equivalent command from your service manager. A reload causes Nginx to accept the new configuration and gracefully retire old workers. Editing a file without reloading leaves the running workers on the previous rules. - Exercise several URL classes. Request the home page, one known post, a page,
/wp-admin/, a static asset, and/wp-json/if the REST API is enabled. Compare access-log status codes with the error log while making each request. A home-page success alongside post 404s points to the fallback; a 502 points toward PHP-FPM; a static-asset 404 points toward the root or filesystem. - Flush WordPress’s stored rewrite state. In the dashboard, open Settings > Permalinks and save the current structure. If the problem remains, select a default structure, save, select the desired structure again, and save once more. This makes WordPress rebuild rewrite rules after the server route is corrected; it cannot substitute for a working Nginx fallback.
WordPress installed in a subdirectory
A site whose public URL is https://example.com/blog/ needs a prefix-aware fallback. The script path in the final argument must include that prefix.
location /blog/ {
try_files $uri $uri/ /blog/index.php?$args;
}
location ~ .php$ {
fastcgi_split_path_info ^(.+.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
The prefix, PHP version, socket, and root in this example are environment-specific. Adapt them to the actual installation rather than copying them unchanged. The Nginx root, the location prefix, and WordPress’s Site Address and WordPress Address settings must describe the same layout. If WordPress files live in a directory named wordpress but the public prefix is /blog/, map that arrangement deliberately; do not assume the directory name and public URL are interchangeable.
Rank #4
- 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
- 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
- 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
- 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
- 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
Test both /blog/ and a deep URL such as /blog/sample-post/. If the home page works but the deep URL fails, inspect the prefixed try_files target before changing WordPress settings.
Multisite is a different configuration
WordPress publishes separate Nginx rules for multisite networks, including distinct variants for subdirectory and subdomain networks. They contain additional rewrites and safeguards that are not present in the single-site block. Do not paste the single-site root snippet into a multisite installation and expect it to handle network routing. Select the variant matching the network layout and the WordPress version, then merge it into the active server block and validate with nginx -T and nginx -t.
Common symptoms and targeted fixes
| Symptom | Most likely layer | What to check |
|---|---|---|
| Home page works; posts return 404 | Virtual-path fallback | Confirm an active location / contains try_files $uri $uri/ /index.php?$args;. Remove an ending =404 that prevents the request reaching WordPress. |
| Plain permalinks work; Post name fails | Nginx routing | Plain links do not require a pretty-URL fallback. Verify the selected server block, root, and try_files target before editing WordPress code. |
| Every request returns 502 | PHP-FPM gateway | Check that the socket or upstream address in fastcgi_pass exists and is running. Review the error log for connection errors. |
| PHP source downloads or is shown as text | PHP location matching | Inspect the regex PHP location, included FastCGI parameters, and whether another location takes precedence. Nginx must pass PHP files to FPM rather than serve them as static files. |
Site works at / but fails under /blog/ |
Prefix mapping | Use a location for /blog/ with a fallback to /blog/index.php?$args; then compare the root and WordPress URL settings with the real filesystem layout. |
| Changing the file appears to do nothing | Configuration activation | Run nginx -T to prove the file is included and the hostname selects that block. Run nginx -t, then reload; an edit alone does not alter running workers. |
| Static files and uploads all 404 | Root or alias mapping | Check the effective root/alias, the path on disk, and directory permissions. A fallback cannot repair a filesystem path that maps to the wrong directory. |
| REST requests fail while pages work | Endpoint routing or an override | Request /wp-json/ directly, inspect access and error logs, and search the loaded configuration for a more specific location or rewrite that intercepts the endpoint. |
How location conflicts create confusing results
Nginx chooses a location according to its matching rules, so a more specific prefix or regular-expression location can prevent the general location / block from handling a request. A second location / in an included file can also make it unclear which configuration is active. This is why the complete nginx -T output matters more than the fragment copied from a tutorial.
Best Value
- 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
- 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
- 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
- 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
- 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
Search the dump for every occurrence of location /, location ~ .php$, try_files, rewrite, root, and alias. Remove obsolete examples, or merge directives intentionally into one server block. After editing, test, reload, and repeat the same URL checks so you know which change produced the result.
Choosing the right fix path
| Situation | Configuration focus | Who normally changes it |
|---|---|---|
| Single site at the domain root | One active location /, root-level index.php fallback, and matching PHP-FPM location |
Server administrator or hosting support |
| Single site below a URL prefix | Prefix-specific location and fallback, plus matching WordPress URL settings | Server administrator; application administrator may flush permalinks |
| Multisite network | Official subdirectory or subdomain network rules for the installed WordPress version | Administrator familiar with the network layout |
| Nginx directly serving PHP | Correct PHP-FPM socket/address and script filename mapping | Server administrator |
| Nginx reverse proxying to Apache or another gateway | Determine which layer owns the WordPress fallback; avoid applying a direct-PHP block to the proxy layer | Administrator of both proxy and application tiers |
| Managed hosting without server access | Provide the hostname, failing URL, expected prefix, and recent status/log details to the host; request an Nginx server-block review | Hosting provider or Nginx administration service |
In a reverse-proxy design, Nginx may only forward requests to Apache, PHP, or an application gateway. In that case, first establish whether the proxy or the backend is supposed to perform the fallback. Adding a PHP-FPM location to a proxy that never executes PHP will not fix the route, and changing backend rules will not help if the proxy returns the 404 before forwarding.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →A compact deployment checklist
- The request hostname selects the server block containing the change.
- The
rootcontains the intended WordPressindex.php. - The root installation uses
/index.php?$args; a prefixed installation uses its prefixed script. - The PHP location reaches the intended PHP-FPM socket or upstream.
SCRIPT_FILENAMEresolves to a real file under the active root.sudo nginx -tsucceeds before any reload.- The running service has been reloaded after the successful test.
- Logs have been checked for the home page, a deep permalink, admin, and static assets.
- Permalinks have been saved in the WordPress dashboard after server routing works.
- Multisite uses its network-specific rules rather than the single-site example.
Bottom line
Fix WordPress 404s on Nginx at the server-routing layer: put the correct try_files fallback in the active server block, align the root, URL prefix, PHP-FPM target, and script filename, then test and reload safely. Flush permalinks only after Nginx can reach WordPress. When the site is multisite, proxied, or managed without configuration access, use the matching documented variant or ask the administrator who controls the active Nginx configuration.
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.

