From 6004fabb04985eeec6c517551d2c95f51e3caff7 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Tue, 4 Feb 2025 13:24:07 -0700 Subject: [PATCH] add a TabList and a tab for each installation method also re-orders the list of install paths to put the gui (easiest) first --- source/content/guides/multisite/03-config.md | 98 +++++++++++--------- 1 file changed, 56 insertions(+), 42 deletions(-) diff --git a/source/content/guides/multisite/03-config.md b/source/content/guides/multisite/03-config.md index 1982aff3ca..9fab4bf676 100644 --- a/source/content/guides/multisite/03-config.md +++ b/source/content/guides/multisite/03-config.md @@ -23,7 +23,56 @@ Adjust placeholders in code snippets as needed throughout this guide. This inclu -## Install WordPress Multisite Via Terminus +## Installing WordPress Multisite + +Choose the best option below to install WordPress multisite based on your site setup and preferences. + + + + + +Complete the steps below after spinning up a new WPMS site from the correct Custom Upstream in your workspace. + +1. Navigate to the WordPress Admin dashboard, select **Tools**, and then select **Network Setup**. + + ![Network setup step 1](../../../images/wp-network-config.png) + +1. Select either the **Sub-domains** or **Sub-directories** option. + +1. Enter the **Network Title** and **Network Admin Email**, and then click **Install**. + +1. Finalize the installation by following steps provided from the GUI or by following the next steps. + + ![Network setup last step](../../../images/wp-network-config-last.png) + +1. Navigate to ** Code** in the ** Dev** tab of your Site Dashboard. + +1. Click **Connect with SFTP**. + +1. Click **Open SFTP client**. + + If you run into issues, please refer to Pantheon's [SFTP documentation](/guides/sftp/sftp-connection-info). + +1. Open the `code` folder in your SFTP client, and download your site's `wp-config.php` file. + +1. Locate the `/* That's all, stop editing! Happy Pressing. */` line, and add the following code above this line to enable the WPMS configuration. + + ```php:title=wp-config.php + define( 'WP_ALLOW_MULTISITE', true ); + define( 'MULTISITE', true ); + define( 'SUBDOMAIN_INSTALL', false ); // Set this to TRUE for Subdomains + // Use PANTHEON_HOSTNAME if in a Pantheon environment, otherwise use HTTP_HOST. + define( 'DOMAIN_CURRENT_SITE', defined( 'PANTHEON_HOSTNAME' ) ? PANTHEON_HOSTNAME : $_SERVER['HTTP_HOST'] ); + define( 'PATH_CURRENT_SITE', '/' ); + define( 'SITE_ID_CURRENT_SITE', 1 ); + define( 'BLOG_ID_CURRENT_SITE', 1 ); + + /* That's all, stop editing! Happy Pressing. */ + ``` + + + + Make sure [Terminus](/terminus) is installed and [authenticated](/terminus/install#authenticate) before you complete the steps below. @@ -91,48 +140,9 @@ A warning may appear in the WordPress dashboard that you need to update your `.h -## Install WordPress Multisite Via the GUI - -Complete the steps below after spinning up a new WPMS site from the correct Custom Upstream in your workspace. - -1. Navigate to the WordPress Admin dashboard, select **Tools**, and then select **Network Setup**. - - ![Network setup step 1](../../../images/wp-network-config.png) - -1. Select either the **Sub-domains** or **Sub-directories** option. - -1. Enter the **Network Title** and **Network Admin Email**, and then click **Install**. - -1. Finalize the installation by following steps provided from the GUI or by following the next steps. - - ![Network setup last step](../../../images/wp-network-config-last.png) - -1. Navigate to ** Code** in the ** Dev** tab of your Site Dashboard. - -1. Click **Connect with SFTP**. - -1. Click **Open SFTP client**. - - If you run into issues, please refer to Pantheon's [SFTP documentation](/guides/sftp/sftp-connection-info). - -1. Open the `code` folder in your SFTP client, and download your site's `wp-config.php` file. + -1. Locate the `/* That's all, stop editing! Happy Pressing. */` line, and add the following code above this line to enable the WPMS configuration. - - ```php:title=wp-config.php - define( 'WP_ALLOW_MULTISITE', true ); - define( 'MULTISITE', true ); - define( 'SUBDOMAIN_INSTALL', false ); // Set this to TRUE for Subdomains - // Use PANTHEON_HOSTNAME if in a Pantheon environment, otherwise use HTTP_HOST. - define( 'DOMAIN_CURRENT_SITE', defined( 'PANTHEON_HOSTNAME' ) ? PANTHEON_HOSTNAME : $_SERVER['HTTP_HOST'] ); - define( 'PATH_CURRENT_SITE', '/' ); - define( 'SITE_ID_CURRENT_SITE', 1 ); - define( 'BLOG_ID_CURRENT_SITE', 1 ); - - /* That's all, stop editing! Happy Pressing. */ - ``` - -## Setting up Multisite on WordPress (Composer Managed) sites + The [Bedrock](https://roots.io/bedrock/)-based [WordPress (Composer Managed)](https://github.com/pantheon-systems/wordpress-composer-managed) upstream uses `Config::define()` and `config/application.php` instead of traditional `define()` statements in `wp-config.php`. You will not be able to use WP-CLI via Terminus to enable multisite as documented above in a standard multisite configuration. This section provides guidance on how to set up a WordPress Multisite using the WordPress (Composer Managed) upstream. @@ -169,6 +179,10 @@ The [Bedrock](https://roots.io/bedrock/)-based [WordPress (Composer Managed)](ht Currently, the built-in dashboard [WordPress Multisite Search and Replace](/guides/multisite/search-replace/) does not support Composer-based WordPress multisites. To perform a search and replace on a WordPress (Composer Managed) multisite, you will need to use WP-CLI via Terminus manually. For more information, see our [WordPress Multisite Search and Replace](guides/multisite/workflows/#run-wp-cli-search-replace-manually) guide. + + + + ## Develop the Multisite Congratulations on setting up your first WordPress Multisite. When you log in to the WordPress Dashboard, you'll see a **My Sites** menu item in the toolbar: