We're using VagrantPress to get a quickly WordPress instance up and running.

Procedure

Download and start VagrantPress


wget -O vagrantpress-master.zip https://github.com/chad-thompson/vagrantpress/archive/master.zip
unzip vagrantpress-master.zip
cd vagrantpress-master
vagrant up

This will likely take up to 10 minutes on the 1st go, but will be much faster subsequently.

On completion:

  • WordPress will now be available at http://localhost:8080/
  • The WordPress installation is available at vagrantpress-master/wordpress
  • Login to the admin site at http://localhost:8080/wp-admin with credentials admin & vagrant

Update /etc/hosts on the guest machine

If you have a hard coded IP address for an external dev system that you'll be connecting to, now is a good time to add it in.

Edit the hosts file on your guest machine:


vagrant ssh
vi /etc/hosts

Add a line pointing to the correct IP address:


192.168.0.103 external-dependency.dev external-dependency

Clone the repo for your plugin

WordPress plugins are installed at /wp-content/plugins below the root WordPress site. Clone the repo in the plugins directory:


cd wordpress/wp-content/plugins
git clone ssh://git@stash.davidsimpson.me:7999/wp001/wordpress-example-plugin.git

Now you can start working on that plugin ;)

I've found VagrantPress to be a very useful and extremely simple way of quickly building a standardised local WordpPress development environment.

Further reading

Some WordPress plugin development best practice guides: