Bedrock Multisite Subfolder or Subdomain
Subfolder Install
Add to config/application.php in Bedrock:
Config::define('WP_ALLOW_MULTISITE', true);
In your browser, visit:
https://YOURSITE.com/wp/wp-admin/network.php
Here you install the network and select sub directory install. (You may need to update your .htaccess or Nginx files at this point)
Add this to your .env file:
DOMAIN_CURRENT_SITE='YOURSITE.com'
Update config/application.php with the following multisite constants:
/**
* Multisite
*/
Config::define('WP_ALLOW_MULTISITE', true);
Config::define('MULTISITE', true);
Config::define('SUBDOMAIN_INSTALL', false);
Config::define('DOMAIN_CURRENT_SITE', env('DOMAIN_CURRENT_SITE'));
Config::define('PATH_CURRENT_SITE', env('PATH_CURRENT_SITE') ?: '/');
Config::define('SITE_ID_CURRENT_SITE', env('SITE_ID_CURRENT_SITE') ?: 1);
Config::define('BLOG_ID_CURRENT_SITE', env('BLOG_ID_CURRENT_SITE') ?: 1);
Add the Bedrock multisite URL fixer plugin:
composer require roots/multisite-url-fixer
Your site should now be running a multisite subfolder setup.
Subdomain Install
Add this to config/application.php in Bedrock:
Config::define('WP_ALLOW_MULTISITE', true);
In your browser, visit:
https://YOURSITE.com/wp/wp-admin/network.php
Here you install network and select subdomain install. (You may need to update your .htaccess or Nginx files at this point)
Add this to your .env file:
DOMAIN_CURRENT_SITE='YOURSITE.com'
Update config/application.php with the following multisite constants:
/**
* Multisite
*/
Config::define('WP_ALLOW_MULTISITE', true);
Config::define('MULTISITE', true);
Config::define('SUBDOMAIN_INSTALL', true);
Config::define('DOMAIN_CURRENT_SITE', env('DOMAIN_CURRENT_SITE'));
Config::define('PATH_CURRENT_SITE', env('PATH_CURRENT_SITE') ?: '/');
Config::define('SITE_ID_CURRENT_SITE', env('SITE_ID_CURRENT_SITE') ?: 1);
Config::define('BLOG_ID_CURRENT_SITE', env('BLOG_ID_CURRENT_SITE') ?: 1);
Add the Bedrock multisite URL fixer plugin:
composer require roots/multisite-url-fixer
Your site should now be running a multisite domain setup but you may need to edit the DNS and hosting for a live domain to accept wild card subdomains.
If that isn’t possible individual subdomain A records may need to be added manually on an individual basis