Install WordPress on a Ubuntu Virtual Machine using VirtualBox
Installing VirtualBox
Installing VirtualBox is fairly straightforward. Once it is installed, we’ll create a VM and configure it for running Ubuntu.
- First, we need to download VirtualBox. Because my host OS is Windows 7, I’ll need the version for Windows hosts (it doesn’t matter what guest OS you plan on using for your VM, you just need the version of VirtualBox for your host OS).
Download the latest VirtualBox binary for Windows hosts if your host OS is Windows - Once it’s downloaded, run the installer. You’ll get a chance to select which features will be installed. I left the features set at their defaults (install everything). Click to continue.
- You’ll get a warning saying that the installation will reset your network connection, so you’ll briefly lose connection to the internet. This is normal (it’s necessary to install a network service that allows the VM within VirtualBox to have access to the internet).
VirtualBox will need to temporarily disconnect you from your network and the internet during installation - Windows will prompt you with a security warning when VirtualBox installs the network service. Click
Windows will pop up a security warning to confirm that you want to install the network service for VirtualBox
to continue.
- The installation should now run without any more prompts or warnings. Once it is complete, click the
If it isn't checked, select the checkbox to "Start Oracle VM VirtualBox...after installation" and click Finish
button and launch VirtualBox.
- Now we’re ready to set up our first virtual machine! On the VirtualBox main screen, click the
This is the main VirtualBox screen; click New to set up a new VM
button.
- Click the
The Create New Virtual Machine wizard will walk you through the process of setting up a VM
button on the welcome screen of the Create New Virtual Machine wizard.
- On the VM Name and OS Type screen, type something into the Name field (I used “WPLinux“), select “Linux” as the Operating System and “Ubuntu” as the Version.
On this screen you must give your VM a name and select which operating system you will be installing - The next screen determines how much RAM the VM will be able to access. I have 4GB on my PC, so I chose to give the VM 1.5GB (1,536KB).
You can select anywhere between 4MB and the maximum amount of RAM on your system; to maintain adequate performance, you should not go below the minimum requirement for your guest OS or above half of your total system RAM - Now we need to set up a virtual hard disk for the VM. Choose “Create a new hard disk” and click .
- The Create New Virtual Hard Disk wizard will launch. Click
The Virtual Hard Disk wizard walks you through the creation of a virtual hard disk for your VM
to continue.
- Choose “Dynamically exapnding storage” on the next screen. This will ensure your VM always has enough hard disk space without getting any larger than necessary.
- On the next screen you can choose a location for the virtual hard disk to reside on your host OS. By default in Windows 7 it will be located in your C:\Users\[your username]\.VirtualBox folder. Type the same name as your VM’s name in the Location field so you know which virtual hard disk goes with which VM, adjust the Size slider to the maximum size you want the virtual hard disk to be (I chose “8GB” which was the default), and click to continue.
Create a name, select a location, and choose the size of the virtual hard disk - You’ll see a Summary screen confirming the settings you just chose. Click the
The Create New Virtual Machine wizard provides a summary of your settings; click Finish to complete the initial setup of the VM
button to create your virtual machine.
- Now that our VM is created, we have a few more settings to adjust. Select your VM in the pane on the left side of the VirtualBox screen, then click the System” in the left pane to bring up the System settings, then click the tab. Choose the number of processors the VM should have access to (I chose “2” for mine; you probably want to choose half the total number of cores your PC has). You may see a message in orange text appear at the bottom of the window. This is just letting you know that some other settings need to be enabled and VirtualBox will enable them automatically. I also selected the “Enable PAE/NX” checkbox for my configuration, but it’s not necessary for your VM to function.
Select the number of processor cores the VM will have access to
button. On the Settings window that appears, click “ - Now click on “Display” in the left pane to bring up the Display settings. Adjust the Video Memory slider to your preference. I chose the maximum of “128MB” because my video card has 1GB of total video memory (plenty to spare). Also check both boxes for Extended Features.
Select how much video memory the VM will have access to and enable video acceleration - Click
Our virtual machine is now configured and ready to install a guest OS
to save the settings. We’re now ready to fire up the VM and install Ubuntu.
On the next page I’ll cover the installation and setup of Ubuntu on the VM.
Series: WordPress Development Environment
- Install WordPress on a Ubuntu Virtual Machine using VirtualBox
- Automatically Set FTP Credentials for WordPress in a Development Environment
- Create a Shortcut to Start XAMPP in Ubuntu
- Access Ubuntu VM Files from a Windows Host
Comments
Comments are closed