I cannot navigate to the customise page under appearance on my fresh install multisite

Hey guys, LOVE bedrock, this is the first time using it for a multisite though.

I’m adding some menus to the customiser menu under appearance but I can’t seem to navigate to the page without getting the “cheating, are we” message. I am the only user so far and I’m super admin. I can however navigate to the page by typing the URL directly and removing the /wp.

Child sites are also able to navigate to the page as they do not have the /wp directory in the URL, only the main site does.

Is there something wrong with my installation?

Here is my htaccess, env and application.php (shortened)

.env

WP_ENV=development
WP_HOME=http://dev.site.com
WP_SITEURL=http://dev.site.com/wp

DOMAIN_CURRENT_SITE=dev.site.com

.htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
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-(content|admin|includes).*) wp/$1 [L]
RewriteRule ^(.*\.php)$ wp/$1 [L]
RewriteRule . index.php [L]
</IfModule>

# END WordPress

application.php

/* Multisite */
define('SITECOOKIEPATH', '');
define('COOKIEPATH', '');
define('COOKIE_DOMAIN', '');
define('ADMIN_COOKIE_PATH', '/');

define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', getenv('DOMAIN_CURRENT_SITE'));
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

Help much appreciated.

Hi again, so I was able to fix the problem using danielck’s solution here https://github.com/roots/bedrock/issues/58

This issue was last year, so just curious if there’s something being done about it or if it’s just a common mistake?

You can’t just add DOMAIN_CURRENT_SITE, the multisite constants and the .htaccess rules to a WP install, Bedrock or otherwise, as a way to enable multisite to work. You basically need to go through the install process in the admin or via the CLI. With Bedrock, you likely also need to check your wp_options and wp_sitemeta tables as @danielck referenced in his earlier comment.

This isn’t an issue with Bedrock, it’s just how WP happens to handle multisite installations. Although, maybe a brief mention of multisite might be a useful addition to the Bedrock docs.

1 Like