Saturday, 23 December 2017

Re: [dcphp-dev] VirtualPress: easy, clean WordPress dev environments on your workstation

Thanks Jason.  I am checking it out right now.

On Tue, Dec 19, 2017 at 5:24 PM, Tac Tacelosky <tacman@gmail.com> wrote:
Works like a charm!  Thanks, Jason.

Tac

On Tue, Dec 19, 2017 at 4:05 PM, Jason A. Lefkowitz <jason@jasonlefkowitz.net> wrote:

Hey gang --

A few years ago, I put together a set of scripts that let you easily create isolated, virtualized development instances of WordPress on your workstation using VirtualBox, Vagrant and Ansible. I originally made it as an easy kick-starter for my own WP projects, but when I showed it to other WP developers they were interested in using it too, so I put it up on GitHub and I've been maintaining it ever since.

Anyway, those scripts worked well for a long time, but the stack they set up for you (PHP 5, Ubuntu 12.04 LTS) has gotten kind of long in the tooth. So to replace it, I've developed a new version that uses Ubuntu 16.04 LTS, PHP 7 and MySQL 5.7. As a bonus, it does all its Ansible stuff on the VM now, so you don't need to have Ansible installed on your workstation to use it anymore. Only two dependencies instead of three! Hooray!

You can get it here:

https://github.com/jalefkowit/virtualpress

Just clone it into a directory, then cd into that directory and do a "vagrant up" and (assuming you have the two dependencies installed) a minute later you'll have a complete, clean install of WordPress for you to hack on running at 192.168.50.50. (And you can change that IP address in the Vagrantfile, if you like.) Clone it again into a different directory and you'll get a different clean environment, completely isolated from the first. And the whole recipe for setting up those environments is specified in simple YAML text files, so you can easily tune it for each new project if you need something other than the default configuration.

Why use this instead of rolling your own WP setup for each new project? Beyond the time savings, this stack provides some nice conveniences and QA touches that it can be easy to overlook:

  • MySQL and WordPress are both set up automatically to use MySQL's UTF8MB4 character set, ensuring your project will be 100% emoji friendly 👍
  • XDebug is installed and configured for you, ready for you to use with your IDE of choice
  • WP-CLI (http://wp-cli.org/) is installed and ready to go
  • Point ansible-playbook (http://docs.ansible.com/ansible/latest/ansible-playbook.html) at the included setup.yml and a cloud VM you have SSH access to, and you'll get an identical environment set up there for easier deployment
These tools have saved me a ton of time and headaches over the years; I share them in hopes they can save you some as well. If you have questions or feedback, feel free to ping me.

-- Jason Lefkowitz

--   Jason A. Lefkowitz  web: http://www.jasonlefkowitz.net  email: jason@jasonlefkowitz.net    "A statesman... is a dead politician.  Lord knows, we need more statesmen." -- Bloom County   

--
You received this message because you are subscribed to the Google
Group: "Washington, DC PHP Developers Group" - http://www.dcphp.net
To post, send email to washington-dcphp-group@googlegroups.com
To unsubscribe, send email to washington-dcphp-group+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/washington-dcphp-group?hl=en
---
You received this message because you are subscribed to the Google Groups "Washington, DC PHP Developers Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to washington-dcphp-group+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google
Group: "Washington, DC PHP Developers Group" - http://www.dcphp.net
To post, send email to washington-dcphp-group@googlegroups.com
To unsubscribe, send email to washington-dcphp-group+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/washington-dcphp-group?hl=en
---
You received this message because you are subscribed to the Google Groups "Washington, DC PHP Developers Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to washington-dcphp-group+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google
Group: "Washington, DC PHP Developers Group" - http://www.dcphp.net
To post, send email to washington-dcphp-group@googlegroups.com
To unsubscribe, send email to washington-dcphp-group+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/washington-dcphp-group?hl=en
---
You received this message because you are subscribed to the Google Groups "Washington, DC PHP Developers Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to washington-dcphp-group+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

0 comments:

Post a Comment