Vincit / wordpress

Addons for WordPress development, using Seravo/wordpress as base
24 stars 14 forks source link

Vagrant halt/up commands randomly fail #22

Closed ghost closed 5 years ago

ghost commented 5 years ago

Using latest Seravo/wordpress with Vincit/wordpress, running with Vagrant 2.0.4 as instructed in Seravo's documentation using OSX Mojave 10.14.1.

Vagrant halt and up commands randomly fail, returning the following error:

The remote command "wp core is-installed --quiet &>/dev/null || wp-vagrant-import-db" returned a failed exit
code or an exception. The error output is shown below:

ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (99)

This causes the next vagrant up command to for example initialize vincit/wordpress-theme-base again from fresh.

ghost commented 5 years ago

Update for this issue before pushing a fix for it.

Turns out the real error that was causing the MySQL-error above was this:

bash: -c: line 0: syntax error near unexpected token `('
bash: -c: line 0: `/usr/local/bin/wp plugin activate --quiet Connecting to local Vagrant environment... (ssh -- /usr/local/bin/wp plugin list --status=inactive --field=name --format=csv) SSH connection confirmed'
vagrant ssh -- -q -t wp plugin list --status=inactive --field=name --format=csv | xargs sudo -u vagrant -i -- wp plugin activate --quiet exited with exit code 123

This error is most likely caused by updates to Seravo/wordpress.