I belive a releated fix was provided in #482
However, running ./deploy.sh staging site1 with the latest version of Trellis fails at TASK [deploy : WordPress Installed?] resulting in this database error:
WordPress database error Table 'site1_staging.wp_blogs' doesn't exist for query SELECT * FROM wp_blogs WHERE domain = 'staging.site1.com' AND path = '/' made by include('phar:///usr/bin/wp/php/boot-phar.php'), include('phar:///usr/bin/wp/php/wp-cli.php'), WP_CLI\Runner->start, WP_CLI\Runner->load_wordpress, require('phar:///usr/bin/wp/php/wp-settings- cli.php'), require('wp-includes/ms-settings.php'), get_site_by_path WordPress database error Table 'site1_staging.wp_sitemeta' doesn't exist for query SELECT meta_value FROM wp_sitemeta WHERE meta_key = 'site_name' AND site_id = 1 made by include('phar:///usr/bin/wp/php/boot-phar.php'), include('phar:///usr/bin/wp/php/wp-cli.php'), WP_CLI\Runner->start, WP_CLI\Runner->load_wordpress, require('phar:///usr/bin/wp/php/wp-settings- cli.php'), require('wp-includes/ms-settings.php'), WP_Network->__construct, WP_Network->_set_site_name, get_network_option WordPress database error Table 'site1_staging.wp_sitemeta' doesn't exist for query SELECT meta_value FROM wp_sitemeta WHERE meta_key = 'siteurl' AND site_id = 1 made by include('phar:///usr/bin/wp/php/boot-phar.php'), include('phar:///usr/bin/wp/php/wp-cli.php'), WP_CLI\Runner->start, WP_CLI\Runner->load_wordpress, require('phar:///usr/bin/wp/php/wp-settings- cli.php'), wp_cookie_constants, get_site_option, get_network_option fatal: [site1]: FAILED! => {"changed": false, "cmd": ["wp", "core", "is-installed", "--network"], "delta": "0:00:00.483683", "end": "2016-04-06 19:47:19.801462", "failed": true, "failed_when_result": true, "rc": 1, "start": "2016-04-06 19:47:19.317779", "stderr": "WordPress database error Table 'site1_staging.wp_blogs' doesn't exist for query SELECT * FROM wp_blogs WHERE domain = 'staging.site1.com' AND path = '/' made by include('phar:///usr/bin/wp/php/boot-phar.php'), include('phar:///usr/bin/wp/php/wp-cli.php'), WP_CLI\\Runner->start, WP_CLI\\Runner->load_wordpress, require('phar:///usr/bin/wp/php/wp-settings-cli.php'), require('wp-includes/ms-settings.php'), get_site_by_path\nWordPress database error Table 'site1_staging.wp_sitemeta' doesn't exist for query SELECT meta_value FROM wp_sitemeta WHERE meta_key = 'site_name' AND site_id = 1 made by include('phar:///usr/bin/wp/php/boot-phar.php'), include('phar:///usr/bin/wp/php/wp-cli.php'), WP_CLI\\Runner->start, WP_CLI\\Runner->load_wordpress, require('phar:///usr/bin/wp/php/wp-settings-cli.php'), require('wp-includes/ms-settings.php'), WP_Network->__construct, WP_Network->_set_site_name, get_network_option\nWordPress database error Table 'site1_staging.wp_sitemeta' doesn't exist for query SELECT meta_value FROM wp_sitemeta WHERE meta_key = 'siteurl' AND site_id = 1 made by include('phar:///usr/bin/wp/php/boot-phar.php'), include('phar:///usr/bin/wp/php/wp-cli.php'), WP_CLI\\Runner->start, WP_CLI\\Runner->load_wordpress, require('phar:///usr/bin/wp/php/wp-settings-cli.php'), wp_cookie_constants, get_site_option, get_network_option", "stdout": "", "stdout_lines": [], "warnings": []}
group_vars/staging/wordpress_sites.yml:
wordpress_sites:
site1:
cache:
enabled: false
env:
domain_current_site: staging.site1.com
wp_home: https://staging.site1.com
wp_siteurl: https://staging.site1.com/wp
local_path: ../site1
multisite:
enabled: true
subdomain: false
repo: [email protected]:redacted/site1.git
site_hosts:
- staging.site1.com
ssl:
enabled: false
provider: letsencrypt
A temporary workaround has been to ssh into the server, navigate to /srv/www/site1/current/ and install Wordpress using WP-CLI:
wp core multisite-install --allow-root --title="Site 1" --admin_user="admin" --admin_password="password" --admin_email="[email protected]"
Can you try running both of these commands on your server and give the output:
wp core is-installed --network
wp core is-installed
ssh [email protected]
cd /srv/www/site1/current
wp core is-installed --network --allow-root — no output
wp core in-installed --allow-root — no output
Am I missing something?
It probably doesn't return anything if it succeeds. Would need to check the return code after each command with echo $?. 0 means success, anything else means failure.
Return code for each command is 0. I hope that helps.
Same for me, return code is the same after running the command:
wp core multisite-install --allow-root --title="Site 1" --admin_user="admin" --admin_password="password" --admin_email="[email protected]"
Before I run into the database error mentioned above.
yep, I also followed the @richvida path, and the setup is green 💃
My deploys are working but I'm still getting 1 fail on the finalize-after.yml hook.
TASK [deploy : WordPress Installed?] *******************************************
System info:
Ansible 2.0.2.0; Darwin
Trellis at "Fix #468 - Use curl to install wp-cli tab completions"
---------------------------------------------------
PHP Warning: Unterminated comment starting line 8 in
phar:///usr/bin/wp/php/WP_CLI/Runner.php(792) : eval()'d code on line 8
fatal: [127.0.0.1]: FAILED! => {"changed": false, "cmd": ["wp", "core", "is-installed", "--network"], "delta": "0:00:00.250489", "end": "2016-08-15 22:47:13.498831", "failed": true, "failed_when_result": true, "rc": 0, "start": "2016-08-15 22:47:13.248342", "stderr": "PHP Warning: Unterminated comment starting line 8 in phar:///usr/bin/wp/php/WP_CLI/Runner.php(792) : eval()'d code on line 8", "stdout": "", "stdout_lines": [], "warnings": []}
to retry, use: --limit @deploy.retry
Using master branch from trellis and bedrock, I received same error as originally reported, had to use @richvida tip of creating site with WP CLI in /srv/www/site/current for deploy task to complete.
Getting the same behaviour here as described in the issue with the current master branch from trellis and bedrock, after following all the setup steps in the docs and with a DigitalOcean droplet.
+1 Same here
Most helpful comment
Same for me, return code is the same after running the command:
wp core multisite-install --allow-root --title="Site 1" --admin_user="admin" --admin_password="password" --admin_email="[email protected]"Before I run into the database error mentioned above.