wplib / wplib-box

The Best Local Dev Server for WordPress Developers
https://wplib.github.io/box-docs/
MIT License
210 stars 24 forks source link

VVV Migration #142

Open TimothyBJacobs opened 7 years ago

TimothyBJacobs commented 7 years ago

It'd be great to offer a VVV migration tool for sites created with vv.

From what I can gather each VVV site gets its own config file in /config/nginx-config/sites/. Each file contains nginx variables with the server_name and root.

Additionally, VVV automatically backs-up sites to the /database/backups/ in a single .sql dump where the file name matches the directory name. The only exception to this rule seems to be the built-in sites like wordpress-default, wordpress-develop, etc... which have their dashes replaced with underscores.

At a minimum a migration wizard should iterate over all *.conf files, excluding the template files, to grab the configuration for all VVV sites and then grab the backups from the backups directory and grab the files from the root value in the .conf files.

Since VVV comes with memcached, it might be necessary to detect if the site has an Object Caching plugin for memcached, and if so install memcached on the box so as not to have any breakage. Just detecting the presence of any object caching provider wouldn't be enough here, because users may have installed Redis or some other object caching back-end.

mikeschinkel commented 7 years ago

Hi @TimothyBJacobs: Thanks for following up on this!

Your description is exactly the kind of thing that we needed.