I’m trying to deploy my multisite installation and I’m hitting a bit of a wall. Here’s the error:
< TASK: deploy | WordPress Installed? >
-------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
failed: [45.55.243.118] => {"changed": false, "cmd": ["wp", "core", "is-installed"], "delta": "0:00:00.679521", "end": "2015-10-24 21:26:38.564000", "failed": true, "failed_when_result": true, "rc": 1, "st
art": "2015-10-24 21:26:37.884479", "stdout_lines": [], "warnings": []}
stderr: WordPress database error Table 'staging_db.wp_blogs' doesn't exist for query SELECT * FROM wp_blogs WHERE domain = '' AND path = '/' made by include('phar:///usr/bin/wp/php/boot-phar.php'), incl
ude('phar:///usr/bin/wp/php/wp-cli.php'), require('phar:///usr/bin/wp/php/wp-settings-cli.php'), require('wp-includes/ms-settings.php'), get_site_by_path
WordPress database error Table 'staging_db.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'), require('phar:///usr/bin/wp/php/wp-settings-cli.php'), require('wp-includes/ms-settings.php'), get_site_option
WordPress database error Table 'staging_db.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/boo$-phar.php'), include('phar:///usr/bin/wp/php/wp-cli.php'), require('phar:///usr/bin/wp/php/wp-settings-cli.php'), wp_cookie_constants, get_site_option
I’ve looked at these similar issues: 5087, 4107 but can’t solve this. Here is my group_vars/staging/wordpress_sites.yml
if that helps:
wordpress_sites:
example.com:
site_hosts:
- stage.example.com
local_path: ../example.com
repo: git@bitbucket.org:conrman/example.com.git
branch: stage
multisite:
enabled: true
subdomains: false
ssl:
enabled: false
cache:
enabled: false
duration: 30s
system_cron: true
env:
domain_current_site: stage.example.com
wp_home: http://stage.example.com
wp_siteurl: http://stage.example.com/wp
wp_env: staging
db_name: staging_db
db_user: stage_dbuser
db_password: my_db_password
...
This seems like a weird error to me because I know Ansible tries to install WordPress for me. I went ahead and ssh’d into the staging server and completed the wp core install
with the proper parameters.
This actually fixes my issue I mentioned above, but now it spits out a new error for the very following task:
< TASK: deploy | Update WP theme paths >
--------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
failed: [45.55.243.118] => {"changed": true, "cmd": ["wp", "eval", "wp_clean_themes_cache(); switch_theme(get_stylesheet());"], "delta": "0:00:00.074997", "end": "2015-10-24 22:39:03.425461", "rc": 1, "start": "2015-10-24 22:39:03.350464", "warnings": []}
stderr: Error: Site not found.
I don’t want to dig myself into a hole here. I know installing the WP core by hand isn’t part of the workflow. I’ve provisioned the staging server and I don’t know what else to do. Any help is appreciated.