Roots Discourse

Issue with Multisite + Gutenberg

Running into a bunch of issues with Multisite and Gutenberg. I have the **Multisite URL Fixer *** enabled in mu plugins

My subsite’s info is:

Site Address: http://subsite.tst/
Site URL: http://subsite.tst
Home: http://subsite.tst/wp

I can’t seem to change the latter two, I believe it may be due to the MU plugin? When I try to save it reverts.

I read through the documentation multiple times and can’t seem to figure out what the issue is.

Note: Locally I am using apache (MAMP), but upstream using trellis, I’m having the same problems in both environments.

I hope to turn my learning experiences here into a guide so that others can learn from what I am doing…

I created a brand new multisite using the following:

(NOTE: The repo I used for this site can be found @ …)

  "name": "roots/bedrock",
  "type": "project",
  "license": "MIT",
  "description": "WordPress boilerplate with modern development tools, easier configuration, and an improved folder structure",
  "homepage": "",
  "authors": [
      "name": "Scott Walkinshaw",
      "email": "",
      "homepage": ""
      "name": "Ben Word",
      "email": "",
      "homepage": ""
  "keywords": [
    "bedrock", "composer", "roots", "wordpress", "wp", "wp-config"
  "support": {
    "issues": "",
    "forum": ""
  "config": {
    "preferred-install": "dist"
  "repositories": [
      "type": "composer",
      "url": ""
  "require": {
    "php": ">=7.0",
    "composer/installers": "^1.4",
    "vlucas/phpdotenv": "^3.0.0",
    "oscarotero/env": "^1.1.0",
    "roots/wordpress": "5.1.1",
    "roots/wp-config": "1.0.0",
    "roots/wp-password-bcrypt": "1.0.0",
    "roots/multisite-url-fixer": "^1.1"
  "require-dev": {
    "squizlabs/php_codesniffer": "^3.0.2",
    "roave/security-advisories": "dev-master"
  "extra": {
    "installer-paths": {
      "web/app/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
      "web/app/plugins/{$name}/": ["type:wordpress-plugin"],
      "web/app/themes/{$name}/": ["type:wordpress-theme"]
    "wordpress-install-dir": "web/wp"
  "scripts": {
    "post-root-package-install": [
      "php -r \"copy('.env.example', '.env');\""
    "test": [

and my wordpress_sites.yml

# Documentation:
# `wordpress_sites` options:
# Define accompanying passwords/secrets in group_vars/production/vault.yml

      - canonical:

    local_path: ../site # path targeting local Bedrock site directory (relative to Ansible root)
    repo_subtree_path: site # relative path to your Bedrock/WP directory in your repo
    branch: master
      enabled: true
      subdomains: true
      enabled: true
      provider: letsencrypt
      enabled: false

I left tmp_multisite_constants.php as it naturally is and added nothing (yet) to application.php

error_reporting(E_ALL & ~E_NOTICE);
define('MULTISITE', false);
define('SUBDOMAIN_INSTALL', false);
define('WPMU_PLUGIN_DIR', null);
define('WP_PLUGIN_DIR', null);
define('WP_USE_THEMES', false);

Provisioned using (trellis provision production … see for the tool i used), then commented out all the PHP in tmp_multisite_constants.phpand added to application.php the following:

Config::define('WP_ALLOW_MULTISITE', true);
Config::define('MULTISITE', true);
Config::define('SUBDOMAIN_INSTALL', true); // Set to true if using subdomains
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);
Config::define('ADMIN_COOKIE_PATH', '/');
Config::define('COOKIE_DOMAIN', '');
Config::define('COOKIEPATH', '');
Config::define('SITECOOKIEPATH', '');

I then deployed using trellis deploy production … see for the tool i used

I setup the Multisite using WP CLI on the box wp core multisite-install --title="site title" --admin_user="mat" --admin_password="gotcha" --admin_email=""

I logged into the multisite network admin and I went to use the created

When I go to and try to update a post that has with Gutenberg I get a failure.

However if I go to (note that I removed the /wp/) I can update the post without issue,

but if I try to customize with and without /wp/ e.g., OR … I get the following failure no matter what I try

You need a higher level of permission.
Sorry, you are not allowed to customize this site.

My questions boil down to –

  • Am I doing anything wrong? I’d like to stay as close to the right way of using Trellis as possible…

  • How can I get the customizer to work?

Note that here are my site settings for

Hi, Im experiencing a similar issue. Have you found a solve?

I have not – I can’t see how anyone can use the customizer on a multisite with trellis, though I am likely doing something wrong

Just to confirm, everything else with this install seems to work? It’s only an issue with Gutenberg posts?

And then the customizer issue is separate?

Am I doing anything wrong? I’d like to stay as close to the right way of using Trellis as possible…

Doesn’t look like it but honestly I don’t have much experience with multisite on Trellis myself

How can I get the customizer to work?

The most likely answer is there’s a bug somewhere… I’m not really much help though :frowning_face:

Can you check/post the contents of the generated .env file (on your VM/server in the web root).

Yes, I’m sorry the two get a bit conflated here, but I did not want to flood with new topics. So, breaking down the two issues here, which are potentially related:

“Out of the box” using the install that I describe above, neither Gutenberg, nor the customizer work.


A temporary bandaid fix for Gutenberg is adding a 301 redirect for :

/wp/wp-admin/post.php* to /wp-admin/post.php*
/wp/wp-admin/post-new.php* to /wp-admin/post-new.php*


I tried the same style fix for customizer, i.e. adding a redirect for the Customizer

/wp/wp-admin/customize.php?return=%2Fwp%2Fwp-admin%2Fedit.php to /wp-admin/customize.php?return=%2Fwp%2Fwp-admin%2Fedit.php

I get the same results as if I do not redirect

In my trellis built server here is my .env


You can recreate my issue using the repo I am using

or I can easily give you access to everything, feel free to message me on slack and then whatever the solution is that we get to I will summarize for the rest of the community.

1 Like

any thoughts here? I may have to abandon MU for client sites if this is an issue. This would really neatly allow me to host multiple client sites on the same server.

There’s a 100% chance this can be fixed.

I currently don’t have the free time to look into this myself.

@mgargano I think I’m experiencing this issue as well. I’ll report back with my findings.

@knowler :+1: I am at a loss at this point.

The solution seems to be as simple as setting the following in config/application.php:

Config::define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST']);

For me the issues had to do with the nonce cookie not being able to verify since the sub-site domain was different than the cookie domain. I was having difficulty with Gutenberg and a multisite using custom domains for sub-sites. So I don’t know if this will work for your issue.

This does not work in my configuration.

Can you test if this works for your Customizer?

Also can you post your application.php

mine is:

Customizer seems to work fine. Here’s my Bedrock config:

OK Few things —

First and foremost : any issue with the single colon? I’ve literally never seen that in PHP

Do you have all subdirectories? subdomains? Do you have any TLD mapped domains?

Thanks for the assistance so far…

Ok some more things…

If I use a subdomain, e.g. and i am able to do everything without any issue.

if i map to a separate domain ( that’s when i have the issue… still digging further…

My bad that’s a syntax error.

I have mapped domains with a subdomain setup.

Have you tried mapping TLDs and not subdomains? If not- can you? I can supply the domain if you need one.

Something isn’t adding up… likely something I’m doing. Would you want to walk through the whole process with trellis and bedrock with me to see where I’m possibly doing something wrong.


@knowler any update here?

See this: