‹ Return to How tos

Define the primary domain for your WordPress Multisite instance in Amazon Lightsail

Last updated: June 18, 2021

A WordPress Multisite instance in Amazon Lightsail is designed to use multiple domains, or subdomains, for each blog site that you create within that instance. Because of this, you must define the primary domain to use for the main blog of your WordPress Multisite instance.

Prerequisites

Complete the following prerequisites in the order shown:

Define the primary domain for your WordPress Multisite instance

Complete these steps to ensure that your domain, such as example.com, redirects to the main blog of your WordPress Multisite instance.

  1. Sign in to the Lightsail console.

  2. On the Lightsail home page, choose the SSH quick connect icon for your WordPress Multisite instance.

    SSH quick connect on the Lightsail console.
  3. Enter the following command to define the primary domain name for your WordPress Multisite instance. Be sure to replace <domain> with the correct domain name for your WordPress Multisite.

    sudo /opt/bitnami/configure_app_domain --domain <domain>

    Example:

    sudo /opt/bitnami/configure_app_domain --domain example.com

    Note

    If this command fails, you might be using an older version of the WordPress Multisite instance. Try running the following commands instead, and be sure to replace <domain> with the correct domain name for your WordPress Multisite.

    cd /opt/bitnami/apps/wordpress
    sudo ./bnconfig --machine_hostname <domain>

    After running that command, enter the following command to keep the bnconfig tool from automatically running every time the server restarts.

    sudo mv bnconfig bnconfig.disabled

    At this point, browsing to the domain that you defined should redirect you to the main blog of your WordPress Multisite instance.

Next steps

Complete the next steps after you have defined the primary domain for your WordPress Multisite instance: