I've deployed a wordpress website recently on an AWS server, using Trellis + Bedrock. The first deployment worked fine and I was finally able to get multiple sites running (as sub-folders).
Later on, our communication agency sent us a theme (also as a Bedrock based theme). So I added it to our repository and deployed again. In the meantime, I've added back the following lines in config/application.php that I had forgotten in the first deployment of the new theme:
/* Multisite */
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false); // Set to true if using subdomains
define('DOMAIN_CURRENT_SITE', env('DOMAIN_CURRENT_SITE'));
define('PATH_CURRENT_SITE', env('PATH_CURRENT_SITE') ?: '/');
define('SITE_ID_CURRENT_SITE', env('SITE_ID_CURRENT_SITE') ?: 1);
define('BLOG_ID_CURRENT_SITE', env('BLOG_ID_CURRENT_SITE') ?: 1);
define('WP_CORE_DIRECTORY', 'wp');
For the wordpress_sites.yml file, I have also those lines:
env:
domain_current_site: <my root url>
multisite:
enabled: true
subdomains: false
Anyway, I can't deploy anymore, I get stuck with this message:
TASK [deploy : Update WP database] ****************************************************************************************************************
System info:
Ansible 2.5.0; Darwin
Trellis at "Add support for includes.d on all sites"
---------------------------------------------------
non-zero return code
Error: This is not a multisite install.
fatal: [<my url>]: FAILED! => {"changed": true, "cmd": ["wp", "core", "update-db", "--network"], "delta": "0:00:00.223736", "end": "2018-03-28 12:06:41.074880", "rc": 1, "start": "2018-03-28 12:06:40.851144", "stderr_lines": ["Error: This is not a multisite install."], "stdout": "", "stdout_lines": []}
I tried to connect as the web user on the server and run some "wp core" commands, but no help there:
web:/srv/www/my_site/current$ wp core multisite-install --title="Landing page" --admin_user="admin" --admin_password="xxx"
Single site database tables already present.
The network already exists.
web:/srv/www/my_site/current$ wp core multisite-convert
The network already exists.
I'm basically stuck there and can not deploy any new change. Any idea of what I could do (except wipe out the server and provision a new one, but that seems as bit violent :) )