Install LAMP on Vagrant for Web Development

Install LAMP on Vagrant for Web Development is a post written after the best tut on it was updated to “Install WordPress Dev Sites on Vagrant with Variable VVV” on “the coolest Guide on Planet“. IMHO the VVV is a overkill and not required by most developers further the learning curve is steep.

Install VirtualBox-Vagrant:Vagrantfilebootstrap.shRun First TimeMore Steps..Few More Steps..Enable Virtual Server: Virtual BoxWeb DevelopmentInstall WorpressMore Steps..Install WP-CLIFinish WP Installation
Step 1: Install VirtualBox:
Step 2: Download and InstallVagrant” I use the “MAC OS X Universal (32 and 64-bit).
Step 3: Create a Directory where you would want to keep the development web pages. in my example ( you can use the finder also )

Step 4: Create a File “Vagrantfile” using “textwrangler” edit the same as follows
Step 5: Create a File “” which will be used by Vagrant to create the Virtual Machine

Step 6: execute “Vagrant Up”

it will take some time to install the dependency and the files as detailed in

Step 7: execute the following

Step 8: execute the following

Step 9: edit the myblog.conf as follows

Step 10: Execute the following to enable the virtual server

that’s it.. you have VirtualBox running with the following installed  “apache2, php5, phpmyadmin & mysql”. you can access the VB on the

If you want to access the webpage http://myblog.local instead of then we have to edit the hosts file on the macbook

Note: to stop the VB use “Vagrant Halt” and start”Vagrant Up” to VB use “Vagrant Destroy”

Your Web Pages should be in Users/yourName/Sites/mywebdev/myblog

We are developing a blog site hence we have to install “WordPress” the easiest way is using “wp-cli

Step 11: Execute the following

Step 11.2: next execute the following

Step 11.2: now let’s install wp-cli

Step 11.3: check if wp-cli is installed

Step 11.4: now to execute the following so that we can use “wp” instead of “php wp-cli.phar”

Step 12: Now we are ready to install the WordPress. Execute the following

boy..this was the longest how to post of mine

Posted in Install LAMP on Vagrant and tagged , , , , .

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.