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.
Use one Nginx server block for each independent WordPress site, or one shared block for a WordPress Multisite network. Every block needs the correct hostname, document root, pretty-permalink fallback, and PHP-FPM connection. Nginx does not read .htaccess, so URL rewrites, PHP restrictions, and access controls must be written in the Nginx configuration and reloaded after testing.
Choose the WordPress architecture first
Your Nginx design depends on whether the sites are separate installations or one Multisite network. This is an architectural decision, not merely a different snippet: it affects isolation, backups, plugin governance, hostnames, and the consequences of a configuration error.
Recommended Free Tools
| Decision area | Separate WordPress installations | WordPress Multisite |
|---|---|---|
| Core files | Each site has its own WordPress files. | All sites share one WordPress core installation. |
| Site data | Each installation normally has its own database and uploads. | Sites have separate database tables and upload directories within the shared network. |
| Hostnames | Independent domains or domain sets, each mapped to its own server block. | Subdomains or subdirectories, selected when the network is created. |
| Plugin and theme governance | Each installation can be managed independently. | Plugins and themes can be shared and governed from the network installation. |
| Isolation | Files, users, databases, and PHP-FPM pools can be separated when you choose that operational model. | A shared core and common configuration increase the potential blast radius of an error. |
| Migration and updates | Updates and migrations are performed per site. | One core update can affect every site, while network data and uploads remain site-specific. |
Use separate installations when customers, teams, security boundaries, or release schedules must remain independent. Use Multisite when the sites are intentionally managed as one network and benefit from shared code and centralized administration. Nginx can serve either design.
How Nginx chooses a WordPress site
Nginx places virtual servers in the http context. Each server block can listen on an address and port, declare one or more names, and point to a document root. For an HTTP request, Nginx first considers the listen address and port, then matches the request’s Host header against server_name. An exact name takes precedence over a wildcard; an explicitly marked default_server receives unmatched names.
#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: 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.
- Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
That means two domains can share one machine without sharing a document root. The most common mistake is adding a second hostname to the first site’s block when the sites actually need separate files, databases, or PHP policies.
Prepare the server before writing blocks
- Point DNS at the server. Create the required A or AAAA records for each domain. A perfectly written Nginx block cannot answer for a hostname whose DNS still points elsewhere.
- Install Nginx, WordPress, and PHP-FPM. The package names and service names vary by operating system and PHP version. Confirm that PHP-FPM is running and note whether its pool listens on a Unix socket or a TCP address.
- Create a document root per installation. For example, use
/var/www/site-aand/var/www/site-b. The directory must contain the site’sindex.phpand WordPress files, and the Nginx worker must be able to read them. - Set ownership and permissions deliberately. Keep database credentials outside publicly served files and avoid making the entire tree writable by the web user. WordPress needs write access only where your update and upload policy requires it.
- Identify the PHP-FPM endpoint. A socket path such as
/run/php/php-fpm.sockis only an example; distributions and PHP versions use different names. You can instead configure a pool to listen on a TCP endpoint such as127.0.0.1:9000. Use the endpoint actually configured on this host.
Configure one independent WordPress site
A normal single-site block has four essential values: the listening address, the hostname, the root, and the PHP index. The location / fallback is what sends a pretty permalink such as /news/article/ to WordPress when no real file or directory exists.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteserver {
listen 80;
server_name example.com www.example.com;
root /var/www/example;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ .php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php-fpm.sock;
}
location ~ /. {
deny all;
}
location ~* /(?:uploads|files)/.*.php$ {
deny all;
}
}
Change the root, names, and fastcgi_pass endpoint for the site. The PHP location’s try_files check prevents Nginx from passing a nonexistent script to PHP-FPM. fastcgi_param SCRIPT_FILENAME maps the requested script to the selected document root; if the mapping is wrong, PHP requests commonly return a 404 or a “primary script unknown” error.
Why the fallback matters
Static files are tried first with $uri, followed by directories with $uri/. Only when neither exists does Nginx internally route the request to /index.php, preserving the original query string through $args. Removing that fallback usually makes the home page work while posts and pages return 404 errors.
Keep security restrictions intentional
The hidden-file rule blocks requests for files whose names begin with a dot, which helps protect items such as environment files and version-control metadata. The uploads rule blocks direct execution of PHP beneath common upload paths. Keep these rules in a shared include only after checking that your application does not deliberately need an exception.
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
Host several independent WordPress installations
Repeat the single-site pattern in one block per site. Give every block a distinct root and hostname. Logs, PHP-FPM targets, and exceptions can also be site-specific.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →server {
listen 80;
server_name site-a.example site-a.example;
root /var/www/site-a;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ .php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php-fpm-site-a.sock;
}
}
server {
listen 80;
server_name site-b.example www.site-b.example;
root /var/www/site-b;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ .php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php-fpm-site-b.sock;
}
}
The socket names above illustrate separate pools; they are not universal filesystem paths. You may point both blocks at one pool, or create separate Unix users and PHP-FPM pools when stronger process and filesystem isolation is part of your operating model. Nginx itself does not require separate pools.
Check overlapping names
Do not leave a broad wildcard or an unintended default block ahead of a site’s intended match. Test each hostname with its real DNS name and inspect the response headers and logs to verify that the request reached the expected root. If an unknown hostname displays site A, review which block is marked default_server and whether a wildcard captures the request.
Organize reusable Nginx configuration
Nginx configuration is hierarchical: the global http context can include many server blocks, and each server can contain URI-specific location blocks. Splitting common logic from host-specific values reduces copy-and-paste errors.
nginx.conf: globaleventsandhttpsettings, MIME types, logs, and includes.conf.d/global/wordpress-common.conf: reviewed hidden-file, upload-PHP, and other shared restrictions.sites-available/site-a.confandsite-b.conf: names, roots, logs, PHP-FPM endpoints, and exceptions for each host.sites-enabled/: enabled files, using the include or symlink convention supplied by your distribution.
Keep the values that identify a host—server_name, root, log filenames, and the PHP-FPM target—in that host’s file. Put only genuinely identical rules in the common include. A shared include that contains a site-specific path can silently send several domains to the wrong location.
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.
Apply and validate changes safely
- Save the file in the directory included by your active Nginx configuration. A correctly formatted file has no effect if it is outside the include tree.
- Run the configuration test. On many installations the command is
nginx -t; use the equivalent command supplied by your distribution. Read the reported filename and line number when it fails. - Correct syntax and semantic mistakes. Check braces, semicolons, duplicate directives, invalid paths, and an unavailable PHP-FPM endpoint. Do not reload a configuration that has not passed the test.
- Reload Nginx. A reload applies the accepted configuration while allowing existing requests to finish, unlike stopping the service first.
- Verify each site. Request the home page, a known pretty permalink, a static asset, and a PHP-backed page. Confirm that the response comes from the intended root and that the logs show the expected server.
Keep a known-good configuration available. If a reload exposes an error, restore the last tested file, run the test again, and reload only after it passes.
Configure WordPress Multisite with Nginx
A Multisite network shares one WordPress core while each site has its own database tables and upload directory. During network creation, choose either subdomain mode or subdirectory mode. The Nginx routing pattern must match that choice; changing the URL model later is a migration project, not a hostname edit.
Subdomain networks
For a network that uses hosts such as blog.example.com and shop.example.com, the main server block must match both the network’s primary name and its site subdomains.
server {
listen 80;
server_name example.com *.example.com;
root /var/www/network;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ .php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php-fpm.sock;
}
location ~ /. {
deny all;
}
location ~* /(?:uploads|files)/.*.php$ {
deny all;
}
}
The wildcard covers hostnames beneath the base domain, but DNS must also resolve those names to this server. A wildcard Nginx name does not create DNS records. If you need a subdomain outside that base domain, add its exact name and ensure the network’s WordPress settings agree.
Subdirectory networks
A subdirectory network uses addresses such as example.com/site-a/. The shared block still needs the normal static-file and index.php fallback, but the Multisite rewrite rules must preserve the site path and route requests through the network’s single front controller. WordPress’s documented rules differ according to the activation era and layout, including the distinction between networks created on WordPress 3.5 and later and older activations.
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.
After enabling Multisite, copy the Nginx rules shown by the network setup process for the selected subdirectory mode, then merge them with your administrator-managed PHP location and security restrictions. Do not paste subdomain rules into a subdirectory network: a request containing /site-a/ must be handled as a path, not as a different host. Test the main site, a child-site home page, a child-site post, and an uploaded media URL before declaring the network complete.
Network-specific operational consequences
- One core or shared plugin change can affect every site, so stage updates and keep a network-wide rollback plan.
- Backups must include the shared files, network database tables, and each site’s uploads.
- Network administrators control the common plugin and theme surface; individual site administrators may not have the same freedom as administrators of separate installations.
- A bad rewrite or PHP rule in the shared server block can take every site offline at once.
Serve WordPress installed in a subdirectory
Another arrangement is a site whose public URL is the domain root while its WordPress files live in a directory. The root request must redirect to that directory, and requests beneath it need a directory-specific fallback.
server {
listen 80;
server_name example.com www.example.com;
root /var/www;
index index.php index.html;
location = / {
return 301 /wordpress/;
}
location /wordpress/ {
try_files $uri $uri/ /wordpress/index.php?$args;
}
location ~ ^/wordpress/.*.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php-fpm.sock;
}
}
Use the directory name and actual PHP-FPM endpoint for your installation. The important detail is that SCRIPT_FILENAME is calculated from the document root and requested script, while the fallback points to the directory’s own index.php. Confirm the site’s WordPress Address and Site Address settings before enabling the redirect, or you can create a redirect loop.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Nginx direct serving versus reverse proxying
When Nginx serves WordPress directly, it serves static files and passes PHP scripts to PHP-FPM with fastcgi_pass. This is different from using Nginx only as a reverse proxy in front of Apache or another HTTP server.
In a reverse-proxy topology, the Nginx location generally uses proxy_pass to an upstream HTTP service and sets the forwarding headers that the application needs, such as the original host, scheme, and client address. Do not combine a proxy configuration with a direct PHP-FPM configuration unless you intentionally have both paths and understand which one handles each URI. Troubleshooting should begin by identifying which topology is actually running.
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.
Diagnose the failures that occur most often
Every pretty permalink returns 404
Check that the active server block contains try_files $uri $uri/ /index.php?$args;, that the request’s hostname selects this block, and that the root contains the expected WordPress files. A missing fallback or a wrong root is more likely than a WordPress database problem.
PHP downloads instead of executing
Nginx is not reaching PHP-FPM. Confirm that the PHP location matches the request, PHP-FPM is running, and the fastcgi_pass socket or TCP endpoint exists and is accessible. Check the Nginx error log and PHP-FPM log together.
PHP returns “primary script unknown” or a 404
Compare root, fastcgi_param SCRIPT_FILENAME, and the actual location of index.php. A socket can be healthy while the path mapping is wrong.
The wrong site appears
Inspect DNS, the request’s Host header, exact and wildcard server_name entries, and the default server. Test by hostname rather than by IP alone; an IP request may intentionally select the default block.
Uploads or hidden files are exposed
Review the shared restrictions and their order, then test a harmless hidden-file path and a PHP file beneath the uploads directory. Keep exceptions explicit instead of deleting the protection globally.
Reload fails after an edit
Run the configuration test and use the reported line number as the starting point. Typical causes include an unmatched brace, a missing semicolon, a directive placed in the wrong context, or a copied PHP-FPM socket path that does not exist on this operating system.
Free tools Windows power users keep installed
One-click scans. No signup required.
A practical decision checklist
- Choose independent installations or Multisite before creating server blocks.
- For independent sites, assign one hostname, root, and site policy to each block.
- For Multisite, decide subdomains versus subdirectories during network creation and use the matching rules.
- Verify DNS and the PHP-FPM endpoint instead of assuming example values are valid locally.
- Keep common security rules in an included file and host-specific values in site files.
- Test the configuration, reload gracefully, and verify a permalink and PHP request for every site.
- When diagnosing an outage, inspect Nginx and PHP-FPM logs together and confirm which server block handled the request.
Bottom line
Nginx can host one WordPress site or many on the same server by matching hostnames to server blocks. Independent installations provide clearer boundaries; Multisite provides a shared core and centralized governance, with either subdomain or subdirectory routing. In both designs, reliable operation comes from the same fundamentals: an accurate root, a pretty-permalink fallback, a verified PHP-FPM target, deliberate security rules, and a tested reload process.
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.

