Using WP-CLI on VVV without SSH

For years I’ve been using MAMP PRO. After blowing up my database recently, I decided to finally switch over to VVV. Luckily I got a fantastic introduction from Konstantin Obenland at the Contributor Day at the WordCamp Bangkok 2018.

After having touched VVV for almost two weeks, I decided to get my hands dirty this weekend and start migrating my projects over to VVV. While creating the projects (and their virtual hosts) was rather easy, I got stuck with using WP-CLI on VVV. After searching for a while, I stumbled upon a post on Github from Joe Hoyle.

Joe suggested updating the wp-config.php or to use bash functionality to use WP-CLI within VVV without SSH. I decided to follow the first approach and changed the MySQL settings within my wp-config.php from

https://gist.github.com/nielslange/ce7f78cdcc2c73cc7942d57fd1711398

to

https://gist.github.com/nielslange/16456dde45bb62ac91b423d2d42831c5

Please note that changing the DB_HOST only is not enough. Both, the DB_HOST, the DB_USER and the DB_PASSWORD have been changed so that the WP-CLI can be used within VVV without SSH.

Leave a Reply

Your email address will not be published. Required fields are marked *