Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk15 min

How to Configure Single and Multiple WordPress Sites with Nginx

Learn when to use separate Nginx server blocks or WordPress Multisite, then configure roots, pretty permalinks, PHP-FPM, security includes and reliable reloads.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use one Nginx server {} block for each independent WordPress installation, and give every block its own hostname, document root and PHP-FPM target. Use WordPress Multisite instead when several sites should share one WordPress core, plugins and themes. In both cases, Nginx must provide the pretty-permalink fallback and pass PHP files to PHP-FPM because it does not read Apache .htaccess files.

This guide shows the server-block layout, working configuration patterns, Multisite routing choices, file organization, security rules, validation steps and the failure checks that matter when one server hosts one or many WordPress sites.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the architecture before writing Nginx rules

There are three practical layouts. A single site uses one virtual server. Several unrelated sites use separate virtual servers, each with its own root and hostname. A Multisite network uses one shared WordPress installation and routes a collection of sites through it.

Architecture Files and core Hostname model Operational effect
Single installation One WordPress root and database One domain or one domain set Simple routing and independent updates
Multiple independent installations Separate roots, databases and site configuration Different domains or unrelated domain sets Better isolation; each site can be moved or repaired separately
WordPress Multisite One shared core; sites have separate database tables and upload directories Subdomains or subdirectories chosen when the network is created Centralized governance, but a shared core or configuration problem can affect the network

Separate installations are usually the safer default when owners, plugins, update schedules or recovery boundaries differ. Multisite is appropriate when one team deliberately wants common administration and shared themes or plugins. Nginx does not decide this choice; it only routes requests to the layout you select.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Compare isolation, overhead and migration

Independent installations isolate files, databases and administrator accounts. You can update one site, restore one database or move one domain without changing the others. The trade-off is repetition: each installation needs its own updates, backups, monitoring and server block. Separate PHP-FPM pools and Unix users can strengthen isolation further, but they add administration and are not required by Nginx.

Multisite centralizes the WordPress core, plugin and theme governance. A security update can be applied once, and a common team can administer many sites from one network. However, a broken shared plugin, damaged core file or incorrect network-level configuration can affect every site. Database and file backups also need to preserve the network structure, and converting between subdomains and subdirectories later is a migration project rather than a simple Nginx edit.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What Nginx is selecting

Nginx can contain multiple server directives inside the http context. For each request it compares the listen address and port with the Host header, then chooses the matching server block. Exact names take precedence over wildcards. A block marked default_server receives unmatched names, so an overly broad default can hide a missing or misspelled site configuration.

Keep this matching model in mind when testing with a browser or command-line client. A correct root in the wrong block still serves the wrong site. Check the hostname being requested, the DNS answer and the enabled configuration file rather than changing try_files at random.

Prerequisites and DNS checks

  • A working Nginx installation with permission to read each WordPress document root.
  • PHP-FPM installed for the PHP version used by WordPress, with a known Unix socket or TCP listener.
  • A database and credentials for each independent installation, or the existing network database for Multisite.
  • DNS records pointing every domain to the server. A Multisite subdomain network also needs wildcard DNS such as *.example.com.
  • Ownership and permissions that let PHP-FPM write only where WordPress needs to write, such as the uploads directory.

Do not copy a PHP-FPM socket path from an example without checking the host. Package names, PHP versions and socket locations vary by operating system. Confirm the actual listener in the PHP-FPM pool configuration or service status before setting fastcgi_pass.

For each independent site, record the canonical hostname, alternate names such as a www alias, absolute document root, log locations, database name and PHP-FPM endpoint. This small inventory prevents a copied block from retaining another site’s root or socket. For a wildcard Multisite network, verify both the apex domain and a sample subdomain resolve before diagnosing Nginx.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Configure one ordinary WordPress site

1. Create the site root and database

Place the WordPress files in a dedicated directory, for example /var/www/site-a, and make the web-server and PHP-FPM identities able to read them. Create a database and a database user for this installation. Keeping the root and database distinct makes later backups, migrations and incident response predictable.

Do not make the entire filesystem writable by PHP-FPM merely to solve an upload error. Grant write access to the directories WordPress actually uses, normally the uploads area and any deliberately managed cache directory, while keeping core and configuration files protected from routine web requests.

2. Add the server block

The essential values are the listen address, hostname, document root and index file. The following is a complete pattern; change the domain, root, log paths and PHP-FPM endpoint to values that exist on your host.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
server {
    listen 80;
    server_name example.com www.example.com;

    root /var/www/site-a;
    index index.php index.html;

    access_log /var/log/nginx/site-a.access.log;
    error_log  /var/log/nginx/site-a.error.log;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ .php$ {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass unix:/run/php/php-fpm.sock;
    }
}

try_files first serves a real file or directory. If neither exists, it sends the request to index.php with the original query string, which is what lets WordPress handle pretty permalinks. The PHP location hands matching scripts to PHP-FPM through FastCGI. Replace the example socket with the actual socket or use a TCP upstream when PHP-FPM listens on an address and port.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The query-string suffix matters for search requests, tracking parameters and plugins that read URL arguments. Omitting ?$args can make a request reach WordPress while silently discarding its original parameters. Keep the fallback in the site block or a carefully designed common include so every independent root resolves to its own index.php.

3. Add deliberate security restrictions

Nginx has no directory-level configuration file equivalent to Apache’s .htaccess. Put restrictions in the server configuration instead of expecting WordPress to create them. A reusable include can deny hidden files and prevent PHP execution in uploads:

# Shared hardening include
location ~ /. {
    deny all;
}

location ~* ^/wp-content/uploads/.*.php$ {
    deny all;
}

Review exceptions before applying a shared include. Some legitimate files begin with a dot, and a site with an unusual media layout may need a narrower uploads pattern. Never enable PHP execution in a directory intended only for uploaded content.

Because Nginx does not process .htaccess, copying an Apache-based WordPress guide without translating its rules leaves gaps. Access controls, rewrites and PHP handling must be reviewed in the active Nginx hierarchy. A common include is useful only when its locations do not conflict with a site’s more specific locations; test the merged configuration, not just the include file by itself.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. Test and reload

  1. Run your distribution’s Nginx configuration test command, commonly nginx -t. If it fails, fix the file and line reported before reloading.
  2. Reload Nginx using the service method supplied by your operating system. A reload applies the new configuration without interrupting current requests.
  3. Open the domain over HTTP and test a front-page URL, a known page with a pretty permalink, an image and a PHP-backed request such as the WordPress login page.
  4. Watch the site-specific Nginx error log and the PHP-FPM log while testing. A 404 on every pretty permalink points to the fallback; a 502 usually points to the PHP-FPM endpoint or service.

Keep the last known-good configuration available. If a reload fails validation, Nginx keeps its previous running configuration; if a valid but incorrect change sends traffic to the wrong root, restoring the prior site file is faster than rebuilding it from memory.

Host several independent WordPress installations

Give every site its own server block

Repeat the single-site pattern, changing server_name, root, logs and PHP-FPM settings for each domain. Nginx can keep all of these blocks in the same http context:

server {
    listen 80;
    server_name site-a.example;
    root /var/www/site-a;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ .php$ {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass unix:/run/php/php-fpm.sock;
    }
}

server {
    listen 80;
    server_name site-b.example;
    root /var/www/site-b;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ .php$ {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass unix:/run/php/php-fpm.sock;
    }
}

Using the same PHP-FPM socket is possible, but it does not provide process isolation. For sites with different owners or risk profiles, use separate Unix users, filesystem permissions, databases and, where practical, separate PHP-FPM pools. Pool separation is an operational hardening choice, not an Nginx requirement.

Distinct roots are essential even when two sites use identical code. A shared root can expose one site’s uploads or configuration to another hostname and makes a migration or restore ambiguous. Give each site separate access and error logs as well; the logs identify which block handled a request and make cross-site failures easier to isolate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

Keep host-specific values out of shared files

Put only genuinely common directives in a shared include. The hostname, document root, access and error logs, upstream or socket and site-specific exceptions belong in each site’s file. This prevents a shared edit from accidentally sending one domain to another site’s files.

Check name collisions

  • Confirm each domain’s DNS record points to this server.
  • Check that the requested hostname appears exactly in one intended server_name.
  • Use wildcard names only when the site design requires them; an overlapping wildcard can capture traffic intended for another block.
  • Inspect which block is marked default_server. Unmatched hosts will land there.

When adding aliases, place them deliberately in the same block only if they are supposed to show the same WordPress site. A domain that should be independent needs its own root and database, not merely another name appended to an existing block.

Configure WordPress Multisite

A Multisite network is a collection of sites sharing one WordPress installation core. Themes and plugins can be shared, while each site has its own database tables and upload directory. During network creation, choose either subdomains or subdirectories; the Nginx routing pattern must match that choice.

Subdomain Multisite

Subdomain mode gives sites addresses such as blog.example.com and shop.example.com. DNS must resolve those hosts, normally through a wildcard record, and the Nginx block must accept both the main domain and its subdomains:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
server {
    listen 80;
    server_name example.com *.example.com;
    root /var/www/network;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ .php$ {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass unix:/run/php/php-fpm.sock;
    }
}

The wildcard does not replace DNS. If the request never reaches this server, a correct Nginx block cannot route it. Keep the main domain and wildcard in the same block only when they belong to the same network.

Test both an existing site host and an unassigned subdomain. The latter should not accidentally resolve to an unrelated default virtual server. Network administrators should also document which subdomains are reserved for administration or other services before enabling a broad wildcard.

Subdirectory Multisite

Subdirectory mode uses addresses such as example.com/blog/ and example.com/shop/. Keep a single non-wildcard server_name for the network and route requests through the shared core:

server {
    listen 80;
    server_name example.com;
    root /var/www/network;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ .php$ {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass unix:/run/php/php-fpm.sock;
    }
}

The network’s generated rewrite instructions must be used for the activation era and layout of that installation. WordPress documents different Multisite rules for networks activated on WordPress 3.5 and later versus older activations, so do not transplant an old ms-files rule into a current network without checking its structure. The key requirement is that a site path such as /blog/ reaches the shared index.php rather than being treated as a missing physical directory.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Subdirectory names can collide with real directories, so review existing paths before creating sites. A physical directory that matches a network site slug may be served directly instead of being routed to the intended site. Keep the generated rules together with the network configuration and document any deliberate exception.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Network-specific operational decisions

  • Install Multisite only when the sites can share a WordPress core and administrative governance.
  • Plan plugin and theme policy centrally; a faulty network-wide component can affect every site.
  • Back up the shared files and the network database before changing rewrite rules or enabling network features.
  • Choose subdomains or subdirectories before activation. Changing the address model later is a migration project, not a server-block toggle.

Serve WordPress from a private directory

Sometimes the public URL is the domain root while WordPress files live under a directory such as /wordpress. In that arrangement, redirect the root request and add a directory-specific fallback:

server {
    listen 80;
    server_name example.com;
    root /var/www/site;
    index index.php;

    location = / {
        return 301 /wordpress/;
    }

    location /wordpress/ {
        try_files $uri $uri/ /wordpress/index.php?$args;
    }

    location ~ ^/wordpress/.*.php$ {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass unix:/run/php/php-fpm.sock;
    }
}

Set WordPress’s Site Address and WordPress Address deliberately for this layout, and verify that the redirect target matches those values. The PHP location is restricted to the directory so another path cannot unexpectedly execute a script.

Test a nested page, an image under the directory and the login URL after changing the addresses. A root that points at /var/www/site while the PHP files live under /var/www/site/wordpress must be reflected consistently in both try_files and SCRIPT_FILENAME.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Organize configuration for safe changes

Nginx configuration is hierarchical: global settings live in nginx.conf, the http context includes site files, and location blocks handle URIs inside each server. Splitting reusable logic into files lets you apply the same restrictions consistently while leaving host-specific values local.

A maintainable layout can look like this:

  • /etc/nginx/nginx.conf: events, http, MIME types, logging defaults and the include for enabled sites.
  • /etc/nginx/conf.d/global/wordpress-common.conf: shared hidden-file and uploads-PHP restrictions.
  • /etc/nginx/sites-available/site-a.conf and site-b.conf: each site’s hostname, root, logs, PHP-FPM endpoint and exceptions.
  • /etc/nginx/sites-enabled/: the distribution’s normal include or symlink location for enabled files.

After every edit, test the full configuration, read the reported file and line if validation fails, then reload. Keep a copy of the last known-good configuration so a bad change can be reverted quickly.

Use descriptive filenames and comments for unusual rules, especially Multisite rewrites and directory-installed WordPress. A common include should be versioned or otherwise tracked so an emergency change can be associated with the site files it affects. Never assume a file is active merely because it exists in sites-available; verify the distribution’s enabled-file include or symlink convention.

Understand the PHP-FPM boundary

When Nginx serves WordPress directly, static files are served by Nginx and PHP scripts are sent to PHP-FPM with fastcgi_pass. The fastcgi_param SCRIPT_FILENAME value must resolve to the real file beneath the selected document root. A wrong root can therefore produce both missing static assets and PHP ‘primary script unknown’ errors.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If Nginx is only a reverse proxy in front of Apache or another HTTP server, do not use the direct FastCGI pattern. Use proxy_pass and set the forwarding headers required by the upstream, such as the original host and scheme. Direct FastCGI and reverse-proxy topologies are separate designs and should not be mixed casually.

Make the topology explicit in your documentation. In a direct setup, PHP-FPM must be reachable by the Nginx worker through the configured Unix socket or TCP address. In a proxy setup, the upstream HTTP service owns PHP handling and rewrite behavior, while Nginx forwards requests. Troubleshooting the wrong layer can waste time and lead to contradictory location rules.

Troubleshoot by symptom

Every pretty permalink returns 404

  • Confirm the request is reaching the intended server block.
  • Check that location / contains try_files $uri $uri/ /index.php?$args;.
  • Verify the WordPress files and index.php are beneath the configured root.
  • Flush or resave WordPress permalinks only after the Nginx fallback is correct; WordPress cannot write Nginx rewrite rules for you.

PHP downloads or returns a 502

  • If the browser downloads PHP, the PHP location is missing, malformed or being superseded by another location.
  • If Nginx returns 502, check that PHP-FPM is running and that the socket or TCP endpoint in fastcgi_pass exists.
  • Compare the configured root with SCRIPT_FILENAME and inspect both Nginx and PHP-FPM logs.

The wrong site answers

  • Inspect the request’s Host header and DNS result.
  • Look for duplicate names, broad wildcards and an unintended default_server.
  • Make sure each independent site has a distinct root and that the enabled-file set contains the block you edited.

Uploads or hidden files are exposed

Move the deny rules into a shared include, test them against a harmless hidden-file request and a PHP file under uploads, then review any deliberate exceptions. Nginx will not inherit protections from an Apache configuration file.

Only one Multisite address works

For subdomain networks, verify wildcard DNS and the wildcard in server_name. For subdirectory networks, confirm the requested slug is routed to the shared index.php and that the rules match the network’s activation era. Check that a real directory or another server block is not intercepting the request first.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Operational checklist

  1. Decide between independent installations and Multisite, then choose the Multisite address model if applicable.
  2. Create DNS records and verify that every hostname resolves to the Nginx server.
  3. Assign a unique root, database and server block to each independent site.
  4. Set the correct try_files fallback and PHP-FPM endpoint.
  5. Add reviewed shared security restrictions and keep exceptions site-specific.
  6. Run the Nginx configuration test after every change.
  7. Reload Nginx, test a static file, a pretty permalink, a PHP request and the intended hostname.
  8. Monitor Nginx and PHP-FPM logs together whenever a request fails.
  9. Keep backups of each independent database and root, or of the complete Multisite files and network database.
  10. Record which block is the default and which names are exact or wildcard matches.

Frequently Asked Questions

Should each independent WordPress site have its own Nginx server block?

Yes. Give every site its own server_name, document root, logs and site-specific settings. Nginx can host all blocks in the same http context and selects one using the listen address, port and Host name.

Can several sites share one PHP-FPM socket?

They can, and Nginx does not require separate pools. Separate Unix users, permissions, databases and PHP-FPM pools are optional hardening choices when stronger isolation between owners or risk profiles is needed.

What is the difference between Multisite subdomains and subdirectories?

Subdomain mode uses hosts such as blog.example.com and requires DNS resolution, commonly including wildcard DNS. Subdirectory mode uses paths such as example.com/blog/ and needs the matching Multisite rewrite rules. Choose the model during network creation.

Why does WordPress not update my Nginx rewrite rules?

Nginx does not read .htaccess, and WordPress cannot write directory-level Nginx configuration automatically. Administrators must place the try_files fallback, Multisite rules and access restrictions in the active Nginx configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What usually causes a 502 Bad Gateway from WordPress on Nginx?

The PHP-FPM service may be stopped, or the Unix socket or TCP endpoint in fastcgi_pass may be wrong. Check the real listener for the installed PHP version and read the Nginx and PHP-FPM logs together.

Can WordPress files live in a directory while the site uses the domain root?

Yes. Redirect the root to the directory, use a directory-specific try_files fallback and restrict the PHP location to that directory. WordPress’s Site Address and WordPress Address must agree with the chosen layout.

How do I prevent an unmatched hostname from showing a WordPress site?

Review the block marked default_server and avoid broad wildcards that overlap other sites. An unmatched Host header is handled by the default block, so a deliberate default response is safer than accidentally exposing one site’s root.

The Bottom Line

Use separate Nginx server blocks, roots and databases for unrelated WordPress installations. Use Multisite only when sites can share one core and governance, then choose subdomains or subdirectories before activation. Every direct Nginx setup needs a correct try_files fallback, a verified PHP-FPM endpoint and administrator-managed security rules because Nginx does not process .htaccess. Test the complete configuration, reload safely and diagnose hostname, root, fallback and PHP-FPM errors from the logs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Leave a Reply

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

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.