Deployment guide

WordPress Multisite 6.9

Videos

Overview: WordPress Multisite 6.9 on Ubuntu 24.04 on Azure: overview (watch on YouTube)

Launch and log in: WordPress Multisite 6.9 on Ubuntu 24.04 on Azure: launch and log in (watch on YouTube)

Deep Dive: WordPress Multisite 6.9 on Ubuntu 24.04 on Azure: deep dive (watch on YouTube)

Overview

WordPress Multisite lets you run a network of sites from a single WordPress install. The sites share one codebase, plugins and themes, while each site keeps its own content, users and settings.

The SecureAnyCloud image installs WordPress 6.9.7 from wordpress.org (checksum-verified) alongside Apache 2.4, MySQL 8.0 and PHP 8.3. All packages come from Ubuntu noble, with no third-party APT repositories. The network is pre-configured in subdirectory layout, so you can add http://your-host/site2/, http://your-host/blog/ and similar sites with no wildcard DNS work.

The network answers at whatever public IP or DNS name you reach the VM on, and every site you add is served at that address too.

What you get:

  • WordPress 6.9.7 with Network Multisite enabled at /var/www/html/wordpress, and automatic 6.9.x security and maintenance releases (WP_AUTO_UPDATE_CORE is minor).
  • Apache 2.4.x with mod_rewrite, plus the multisite RewriteRule block built into the vhost (no .htaccess dependency).
  • MySQL 8.0.x with a wordpress database and a wpuser MySQL user (per-VM password).
  • PHP 8.3.x with the mysqli, gd, mbstring, xml, curl and zip extensions. WordPress resizes images with PHP's GD library, and ImageMagick is not installed.
  • WP-CLI 2.x at /usr/local/bin/wp.
  • wordpress-multisite-firstboot.service. On the first boot of your VM, it generates new MySQL root, WordPress database, WordPress admin and MySQL maintenance (debian-sys-maint) passwords, and all eight WordPress authentication keys and salts in wp-config.php. MySQL also generates its own TLS and RSA keys on that boot, so no two VMs share a password, a login-cookie key or a database key.
  • Apache and MySQL enabled and auto-starting on boot.
  • 24/7 SecureAnyCloud support.

Prerequisites

Before you deploy this image, make sure you have an active Azure subscription, an SSH key, and a VNet with a subnet.

A Standard_B2s VM (4 GB RAM) is fine for small networks (under 20 sites, low traffic). Use D2s or D4s for medium networks or WooCommerce stores.

Step 1 to 3: Deploy and SSH (standard pattern)

Deploy the VM, then connect over SSH:

ssh azureuser@<vm-ip>
4

Verify Services

Check that Apache and MySQL are running:

sudo systemctl status apache2 mysql --no-pager | head -20
5

Read Per-VM Credentials

The first-boot service rotates passwords and writes the per-VM credentials to /var/lib/sac/secrets/sac-credentials.txt. Read the file as root:

sudo cat /var/lib/sac/secrets/sac-credentials.txt

The file looks like this:

# WordPress Multisite 6.9 — Per-VM Credentials
# Generated: <date>
#
# Visit your VM's public IP in a browser to access WordPress: # http://<your-public-ip>/ (front of site) # http://<your-public-ip>/wp-admin/ (single-site admin) # http://<your-public-ip>/wp-admin/network/ (network superadmin) # WP_ADMIN_USER=admin WP_ADMIN_PASSWORD=<random> WP_DB_NAME=wordpress WP_DB_USER=wpuser WP_DB_PASSWORD=<random> MYSQL_ROOT_PASSWORD=<random>
6

Login to wp-admin

Go to http://<vm-ip>/wp-login.php and sign in as admin with the password from Step 5. To confirm the WordPress version from the command line, run:

sudo -u www-data /usr/local/bin/wp core version --path=/var/www/html/wordpress
7

Network Admin: Sites

After you sign in, go to http://<vm-ip>/wp-admin/network/sites.php to see your network's sites. The primary site (blog_id=1) is created automatically.

8

Add a New Site

On the Network Admin Sites page, select Add New to create another site in the network.

In subdirectory layout, new sites live under paths such as http://<vm-ip>/blog/ or http://<vm-ip>/store/ with no DNS work. Each site's own dashboard is at http://<vm-ip>/<site-slug>/wp-admin/.

9

WP-CLI Network Operations

WP-CLI is fully network-aware. List the sites in your network:

sudo -u www-data /usr/local/bin/wp site list --path=/var/www/html/wordpress

Create a new site without the web interface:

sudo -u www-data /usr/local/bin/wp site create --slug=blog --title="Blog" --path=/var/www/html/wordpress

List the network plugins:

sudo -u www-data /usr/local/bin/wp plugin list --network --path=/var/www/html/wordpress
10

Components

These are the main components and where they live on the VM:

  • WordPress install: /var/www/html/wordpress/
  • wp-config.php (with multisite block): /var/www/html/wordpress/wp-config.php
  • Apache vhost (with multisite RewriteRules): /etc/apache2/sites-available/wordpress.conf
  • Apache logs: /var/log/apache2/wordpress-{access,error}.log
  • MySQL data: /var/lib/mysql/
  • WP-CLI: /usr/local/bin/wp
  • First-boot script: /usr/local/sbin/wordpress-multisite-firstboot.sh
  • Credentials: /var/lib/sac/secrets/sac-credentials.txt (mode 0600 root:root)
11

Security

  • HTTPS: install certbot and obtain a Let's Encrypt certificate with the --apache plugin: sudo apt-get install -y certbot python3-certbot-apache && sudo certbot --apache. If you ever switch to subdomain layout, you will want a wildcard certificate. Otherwise, the certbot Apache plugin handles the primary host fine.
  • Restrict the network security group (NSG). Open port 80 only to your CDN, load balancer or Cloudflare, and keep port 22 open to your management CIDR only.
  • WordPress core updates: security and maintenance releases on the 6.9 branch install automatically (define( 'WP_AUTO_UPDATE_CORE', 'minor' ); in wp-config.php). Moving to a new major release is your decision. Back up first, then run sudo -u www-data /usr/local/bin/wp core update --path=/var/www/html/wordpress
  • Update plugins and themes monthly at the network level: wp plugin update --all --network and wp theme update --all --network
  • Enable two-factor authentication network-wide with Wordfence or the Two Factor Authentication plugin, and network-activate the plugin.
  • Patch monthly: apt-get update && apt-get upgrade && reboot
  • Limit super-admins. Only the admin user should be a super-admin. Per-site admins should be regular admins.

Multisite Notes

  • Subdirectory or subdomain layout: this image is configured in subdirectory layout (sites at /site2/, /blog/ and so on). To switch to subdomain layout, edit wp-config.php and change define('SUBDOMAIN_INSTALL', false); to true. Then add a wildcard A record *.your-domain.com -> <vm-ip>, and re-run wp core multisite-convert --subdomains if you have not yet added new sites.
  • Network Admin URL: http://<vm-ip>/wp-admin/network/ (not /wp-admin/)
  • Adding sites in the web interface: the per-site admin URL is http://<vm-ip>/<site-slug>/wp-admin/

Licensing

WordPress is GPL-2.0+ and free to use commercially. SecureAnyCloud provides commercial support separately. sales@secureanycloud.com.

Deploy on Azure

Launch WordPress Multisite 6.9 on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure