I created a brand new multisite using the following:
(NOTE: The repo I used for this site can be found @ GitHub - matgargano/multisite …)
{
"name": "roots/bedrock",
"type": "project",
"license": "MIT",
"description": "WordPress boilerplate with modern development tools, easier configuration, and an improved folder structure",
"homepage": "https://roots.io/bedrock/",
"authors": [
{
"name": "Scott Walkinshaw",
"email": "scott.walkinshaw@gmail.com",
"homepage": "https://github.com/swalkinshaw"
},
{
"name": "Ben Word",
"email": "ben@benword.com",
"homepage": "https://github.com/retlehs"
}
],
"keywords": [
"bedrock", "composer", "roots", "wordpress", "wp", "wp-config"
],
"support": {
"issues": "https://github.com/roots/bedrock/issues",
"forum": "https://discourse.roots.io/category/bedrock"
},
"config": {
"preferred-install": "dist"
},
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
}
],
"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": [
"phpcs"
]
}
}
and my wordpress_sites.yml
# Documentation: https://roots.io/trellis/docs/remote-server-setup/
# `wordpress_sites` options: https://roots.io/trellis/docs/wordpress-sites
# Define accompanying passwords/secrets in group_vars/production/vault.yml
wordpress_sites:
manage.matgargano.com:
site_hosts:
- canonical: manage.matgargano.com
local_path: ../site # path targeting local Bedrock site directory (relative to Ansible root)
repo: git@github.com:matgargano/multisite.git
repo_subtree_path: site # relative path to your Bedrock/WP directory in your repo
branch: master
multisite:
enabled: true
subdomains: true
ssl:
enabled: true
provider: letsencrypt
cache:
enabled: false
env:
domain_current_site: manage.matgargano.com
I left tmp_multisite_constants.php
as it naturally is and added nothing (yet) to application.php
<?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 GitHub - roots/trellis-cli: A CLI to manage Trellis projects for the tool i used), then commented out all the PHP in tmp_multisite_constants.php
and 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('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);
Config::define('ADMIN_COOKIE_PATH', '/');
Config::define('COOKIE_DOMAIN', '');
Config::define('COOKIEPATH', '');
Config::define('SITECOOKIEPATH', '');
I then deployed using trellis deploy production manage.matgargano.com
… see GitHub - roots/trellis-cli: A CLI to manage Trellis projects 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="mat@me.com"
I logged into the multisite network admin and I went to use the created manage.matgargano.com
When I go to https://manage.matgargano.com/wp/wp-admin/post.php?post=2&action=edit
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/) https://manage.matgargano.com/wp-admin/post.php?post=2&action=edit
I can update the post without issue,
but if I try to customize with and without /wp/
e.g., https://manage.matgargano.com/wp/wp-admin/customize.php?return=%2Fwp%2Fwp-admin%2F OR https://manage.matgargano.com/wp-admin/customize.php?return=%2Fwp%2Fwp-admin%2F … 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 –
Note that here are my site settings for manage.matgargano.com