Running WordPress Locally with Vagrant

Posted OnDec 2, 2013     CategoryInstalling WordPress     CommentsNo comment

In this tutorial we’re going to show you how to run WordPress locally with Vagrant.

Step 1) Download and install VirtualBox, it’s free and what will provide the layer that Vagrant runs on.

Step 2) Download and install Vagrant.

Step 2) Download Vagrantpress as a zip file, and extract it wherever you want.

Step 3) Open a Terminal/Command Prompt and navigate to the directory where you extracted Vagrantpress.

Step 4) Run the following command to start Vagrant

vagrant up

Depending on your system, you should see something similar to the following, though please note that it may need to download various resources in order to get started, and this may take some time.

Bringing machine 'default' up with 'virtualbox' provider...
[default] Box 'precise64' was not found. Fetching box from specified URL for
the provider 'virtualbox'. Note that if the URL does not have
a box for this provider, you should interrupt Vagrant now and add
the box yourself. Otherwise Vagrant will attempt to download the
full box prior to discovering this error.
Downloading or copying the box...
Extracting box...te: 568k/s, Estimated time remaining: --:--:--)
Successfully added box 'precise64' with provider 'virtualbox'!
[default] Importing base box 'precise64'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...

Once Vagrant is up, you can visit http://localhost:8080/wp-admin/ where you can find your WordPress install, where the username is ‘admin’ and the password is ‘vagrant’.

To turn the VM off, simply run `vagrant halt` in the terminal, in the same directory where you started it.

Of course, this is just one configuration, you can also try the popular Varying Vagrant Vagrants, or if you’re feeling bold, go so far as to just run `vagrant up` then `vagrant ssh` and do it all from the command line!

Leave a Reply

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

Send this to friend