keepcalculator

06 Numbers and Powers

WordPress Multisite Security: Step-by-Step Guide

Card No. 06·33113 · Updated · Standard formula, shown below

Securing a WordPress Multisite network requires a layered approach because one vulnerable site can compromise every site on the network. This guide walks you through hardening the core, limiting plugin and theme access, protecting user roles, and monitoring activity—so you can lock down the entire network without breaking individual sites.

What You’ll Need

  • Administrator access to the WordPress network (Super Admin).
  • Access to your hosting control panel or FTP/SFTP to edit files like wp-config.php and .htaccess.
  • Ability to install plugins (network‑wide).
  • A backup solution already in place (essential before making changes).

Step-by-Step

  1. Update everything. Go to Dashboard → Updates and update WordPress core, all plugins, and all themes. Run updates on the network level to ensure every site is current. Enable automatic background updates for minor core releases and security patches in wp-config.php by adding: define('WP_AUTO_UPDATE_CORE', true);
  2. Harden wp-config.php. Add security keys (salts) from the official WordPress generator, disable file editing with define('DISALLOW_FILE_EDIT', true);, and limit post revisions with define('WP_POST_REVISIONS', 5);. Also set define('FORCE_SSL_ADMIN', true); to force SSL on all admin pages.
  3. Enforce HTTPS across the network. In the network admin, go to Settings → Network Settings and set both “Site address” and “Home” URLs to use https://. Then add redirect rules in .htaccess (Apache) or your server config (Nginx) to redirect HTTP to HTTPS.
  4. Limit plugin and theme installation. By default, only Super Admins can install plugins and themes. Keep it that way. Do not grant individual site administrators the ability to install plugins unless absolutely necessary—this prevents a compromised admin account from uploading malicious code.
  5. Use a security plugin network‑wide. Install a reputable security plugin (e.g., Wordfence, Sucuri, iThemes Security) and activate it network‑wide. Configure a web application firewall, enable login attempt limiting, and set up two‑factor authentication (2FA) for all administrators.
  6. Restrict user registration and roles. In Network Settings, disable new registrations if not needed, or set them to require email confirmation. Never allow “Subscriber” as a default role—use “None” or a custom role with minimal permissions.
  7. Monitor file changes. Use the security plugin’s file integrity scanner to detect unauthorized changes to core files, plugins, and themes. Schedule scans daily and set up email alerts.
  8. Protect the wp-admin directory. Add IP allowlisting if your admins have static IPs. Otherwise, use a plugin to add extra authentication (e.g., a password prompt) before accessing wp-admin.
  9. Secure database prefixes. If your network is new, change the database prefix from wp_ to something random. For existing networks, this is complex—consider using a plugin that can rename the prefix safely, but always test on a staging copy first.
  10. Disable XML‑RPC if not used. XML‑RPC is a common attack vector. Add add_filter('xmlrpc_enabled', '__return_false'); to a network‑active plugin or a custom mu‑plugin to disable it network‑wide.
  11. Set proper file permissions. Ensure directories are 755 and files are 644. Never use 777. Check with your hosting provider if you’re unsure.
  12. Backup regularly. Use a backup plugin that supports Multisite (e.g., UpdraftPlus, BackWPup) and store backups offsite. Test restores periodically.

Common Mistakes

  • Ignoring individual site admins. A compromised site admin can inject malicious code via posts or uploads. Always use the lowest privilege necessary.
  • Not using network‑wide security settings. Security plugins must be activated network‑wide, not per site, to protect all subsites.
  • Leaving default admin usernames. The default “admin” username is a prime target. Create a new Super Admin with a unique name and delete the old one.
  • Forgetting to secure the network admin area. The network admin has ultimate control—apply 2FA and strong passwords there first.
  • Skipping SSL on some subsites. Mixed content or HTTP subsites can expose data and break security headers.

Tips

  • Use a dedicated security plugin for Multisite. Not all plugins are Multisite‑compatible; check the plugin’s documentation before activating network‑wide.
  • Implement security headers. Add headers like X‑Content‑Type‑Options: nosniff and X‑Frame‑Options: SAMEORIGIN via your server config or a security plugin.
  • Regularly audit user accounts. Remove inactive users and check for suspicious accounts.
  • Keep a staging environment. Test updates and security changes on a staging copy of the network before applying to production.
  • Use a CDN with a firewall. A content delivery network can absorb DDoS attacks and filter malicious traffic before it reaches your server.

Troubleshooting

Site becomes inaccessible after changing URLs to HTTPS. If you lose access, revert the URLs via wp-config.php by adding:

define('WP_HOME', 'http://example.com');
define('WP_SITEURL', 'http://example.com');

Then fix the SSL certificate issue and re‑enable HTTPS.

Security plugin breaks a subsite. Deactivate the plugin network‑wide via Plugins → Installed Plugins and check if the issue resolves. Some plugins have settings that conflict with certain themes—adjust the plugin’s firewall rules or exclude the problematic file.

File permissions error after changing. If you set permissions too restrictive, you may get 500 errors. Revert to 755 for directories and 644 for files via FTP.

Users cannot upload files after hardening. Check that the uploads directory is writable (usually 755 or 775 depending on your server). Ensure the security plugin isn’t blocking file types.

Frequently Asked Questions

Do I need to secure each site individually?

No. Security measures applied network‑wide (plugins, settings, file permissions) protect all sites. However, you should still monitor each site’s activity and user roles.

Can I use a single security plugin for all subsites?

Yes. Choose a plugin that explicitly supports Multisite and activate it network‑wide. Configure settings once and they apply to all sites.

What is the most important security measure for Multisite?

Keeping everything updated and using strong authentication (2FA) for all administrators, especially Super Admins. A single compromised admin account can take down the entire network.

Should I change the database prefix on an existing network?

It’s risky but possible. Use a reputable plugin that handles prefix changes, and always backup first. Test on a staging copy to avoid data loss.

How do I block brute force attacks on the network?

Enable login limiting and 2FA via a security plugin. You can also add IP blocking rules at the server level, but be careful not to lock out legitimate users.

Is it safe to allow site admins to install plugins?

It’s not recommended. If a site admin’s account is compromised, they could install malicious plugins. Keep plugin installation restricted to Super Admins only.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →