How to use vagrant to mirror or sync to my Hosted WordPress Site to allow testing locally?

79 views
Skip to first unread message

Nathan Abraham

unread,
Sep 5, 2015, 1:49:20 PM9/5/15
to WordPress and Vagrant
Hello - I have a WordPress self hosted site that I want to develop further - But with the great advantage of testing locally, with Vagrant, Plugins, their Upgrades, Theme,  Before I apply them to my Hosted WordPress.
Also, In case my Hosted site goes down, If possible, I'd like to be able to Restore it from my Local copy.
Can anyone tell me how to create a copy of my Self Hosted WordPress site in my Local Vagrant setup?
Thanks for your help,
Nathan

Robert Lilly

unread,
Sep 5, 2015, 4:52:00 PM9/5/15
to WordPress and Vagrant
Hi Nathan, are you using a custom instance of Vagrant or a prepackaged version like Varying Vagrant Vagrants ( VVV )? VVV comes with an autosite script which will automatically add any sites in subfolders under the www/ folder. It will add the site to the Nginx configuration and to the hosts file. The contents of this subfolder can be a mirror of your production site, which you can keep in sync with Git or even SFTP. For more information see the VVV repository on GitHub.

Robert Lilly

unread,
Sep 6, 2015, 2:34:22 AM9/6/15
to WordPress and Vagrant
To learn more about VVV's autosite script see https://github.com/varying-vagrant-vagrants/vvv/wiki/Auto-site-Setup.

Also, while VVV and Chassis both make use of Vagrant for generating virtual machines for WordPress development they differ from each other in the type of environment you end up with. Each has its own use case and one would use one or the other, but not both in tandem.

Nathan Abraham

unread,
Sep 6, 2015, 3:25:17 PM9/6/15
to WordPress and Vagrant
Hi Bob - thanks again for the info. Do you know where I can find examples - use case descriptions - for each.
Best,
Nathan

Robert Lilly

unread,
Sep 7, 2015, 4:28:30 PM9/7/15
to Nathan Abraham, WordPress and Vagrant
The main differences are that VVV pretty much contains everything a developer needs to contribute to core, write plugins, develop websites, etc., whether one wants all of that or not. It allows one to use a single virtual machine for everything. Chassis is more streamlined and uses an extension system to add more features. Chassis VMs are single use machines, good for one specific project. For multiple projects you'll need to spin up multiple instances of Chassis. If you're only working on a single website at any given time Chassis might be easier to get started with.

Some articles mentioning both are: The homepage of Chassis (https://chassis.github.io/), 13 Vagrant Resources for WordPress Development, and Getting Started with Vagrant for Local Development.

Robert

--
You received this message because you are subscribed to the Google Groups "WordPress and Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wordpress-and-va...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages