Setting Up WordPress Multisite on AWS Lightsail
Setting up a WordPress Multisite on AWS Lightsail involves a few extra steps compared to a regular WordPress installation. Here is a step-by-step guide to help you through the process:
Step 1: Launch an instance on AWS Lightsail
- Log in to the AWS Lightsail console at https://lightsail.aws.amazon.com/.
- Click «Create instance» and choose the WordPress blueprint.
- Configure your instance settings and launch the instance.
Step 2: Connect to your instance
- Once the instance is running, connect to it using SSH. You can do this through the browser-based SSH client that Lightsail provides.
Step 3: Configure WordPress for Multisite
- In the SSH terminal, navigate to the WordPress installation directory:
cd /opt/bitnami/wordpress/
- Open the wp-config.php file using a text editor:
sudo nano wp-config.php
- Add the following lines just above the line that says /* That’s all, stop editing! Happy blogging. /: / Multisite */
define('WP_ALLOW_MULTISITE', true);
- Save your changes and close the text editor.
Step 4: Set up the Multisite network
- In the SSH terminal, go to the WordPress admin panel by entering your instance’s public IP address or domain name in a web browser.
- Go to «Tools» -> «Network Setup» in the WordPress dashboard.
- Choose the type of Multisite setup you want (subdomains or subdirectories) and enter the network details.
- Follow the instructions provided by WordPress to update your wp-config.php and .htaccess files.
Step 5: Update the DNS settings
- If you chose the subdomain option in the previous step, you will need to set up wildcard DNS records pointing to your Lightsail instance’s IP address.
- Log in to your domain registrar or DNS provider and add a wildcard DNS record (for example, *.example.com) pointing to your instance’s IP address.
Step 6: Complete the setup
- Log back in to your WordPress admin panel, and you will now see the new «My Sites» menu.
- From this menu, you can create new sites, manage existing ones, and customise the network settings.
Done! You have successfully set up a WordPress Multisite on AWS Lightsail. You can now create and manage multiple WordPress sites within your network.
