Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multisite is-installed deploy check still failing #554

Closed
richvida opened this issue Apr 6, 2016 · 10 comments
Closed

Multisite is-installed deploy check still failing #554

richvida opened this issue Apr 6, 2016 · 10 comments

Comments

@richvida
Copy link

richvida commented Apr 6, 2016

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]"
@swalkinshaw
Copy link
Member

Can you try running both of these commands on your server and give the output:

wp core is-installed --network
wp core is-installed

@richvida
Copy link
Author

richvida commented Apr 6, 2016

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?

@swalkinshaw
Copy link
Member

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.

@richvida
Copy link
Author

richvida commented Apr 6, 2016

Return code for each command is 0. I hope that helps.

@o1y
Copy link

o1y commented Apr 7, 2016

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.

@ph4un00b
Copy link

yep, I also followed the @richvida path, and the setup is green 💃

@michaelsalafia
Copy link

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

@miklb
Copy link

miklb commented Sep 2, 2016

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.

@monotv
Copy link

monotv commented Sep 25, 2016

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.

@craigpearson
Copy link
Contributor

craigpearson commented Oct 11, 2016

+1 Same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants