Multisite setup?

I can’t find any documentation on setting up multisite under bedrock; only for trellis – which isn’t working for a bedrock/sage only setup.

I feel that I shouldn’t have to modify more than the .env and /config/application.php to get this working.

Any help/insight?

Those are the only two Bedrock files you gotta modify. In fact, you don’t really have to modify .env at all. Just application.php.

This should be all it all that’s required, I think:

 * Multisite Network
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false); // obv switch this to true if you're using subdomains
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

You also have to set up your rewrites, of course.

If you’re still having issues, check to make sure that WordPress didn’t do something super duper “helpful” like add the multisite stuff to the wp-config in your document root (bedrock/web/wp-config.php). lol

So what are the custom rewrites? That’s likely the issue im facing here because I have zero issues installing wpmu outside of bedrock.

Subdomain or subfolder install? What webserver - Apache or Nginx?

apache – subdomain.

WordPress provides you with the .htaccess rules you need when you go to setup multisite. Have you implemented those? Did you not see them? Have you not tried looking for them?

Let us know what you’ve tried to do to troubleshoot this.

I think this will work.

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-.*.php)$ wp/$1 [L]
RewriteRule ^(wp-(content|admin|includes).*) wp/$1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
1 Like