Install WordPress on a Ubuntu Virtual Machine using VirtualBox
Installing Ubuntu on the Virtual Machine
Now that the VM is configured, it’s time to install Ubuntu. You can download the .iso from Ubuntu’s website.

Once it’s downloaded you have two options: burn it to disc or mount it to a virtual optical drive using a program like Daemon Tools or MagicISO. I find it very fitting to install Ubuntu onto a virtual machine using a virtual optical drive, so I mounted the .iso file using MagicISO. Either way will work because your VM will recognize your real optical drive(s) as well as any virtual optical drives you create.
- To get started, open VirtualBox, select the VM, and click the Startbutton. This will start the First Run Wizard and walk you through the process of setting up the guest OS and virtual hard drive.
Starting the VM for the first time will launch the First Run Wizard - Click Host Drive ‘G:’” because that is the virtual optical drive that MagicISO created. Click to continue.
Select the location of the installation media; it will be on a "Host Drive"
to continue to the next screen, then select the host drive that has the .iso file on it. For me it was “ - The next screen shows a summary of your selection. If anything looks wrong you can click the
Click the Finish button on the summary screen to boot the VM
arrow in the top-left corner of the window and select a different host drive. If everything looks good, click to boot up your VM.
- The VM will take a few moments to boot up, at which point you’ll see a screen similar to the one below:
- Eventually you’ll get to a Welcome screen that allows you to select a language and either or . Because this is a VM, go ahead and click on .
- The next screen will remind you to make sure your computer has enough disk space, verify that it is plugged into the wall (if it’s a laptop), and ensure that it is connected to the internet. Go ahead and check the boxes for “Download updates while installing” and “Install this third-party software” to make sure the OS is fully up to date. Click to continue.
Check to make sure your computer is plugged in, verify that it has enough free disk space, and make sure it's connected to the internet - On the next screen select the option to “Erase and use the entire disk” and click to continue.
- Ubuntu will then provide you with the option to select a drive to install itself on. Because this is a VM and you only have one virtual hard disk, just click
Only one virtual hard disk is available on the VM, so leave the default selection and click Install Now
to use the virtual hard disk.
- The next part of the installation will take a while. Ubuntu will copy all of the files it needs.
- While the files are being copied, you will be prompted to enter your location so a time zone can be chosen. Type the closest major city in your time zone into the text field (delete “New York” and enter your city there instead). When you type into the text field, Ubuntu may be unresponsive for a few moments. Go ahead and type in your city even if the screen doesn’t show what you’re typing (it will eventually). Wait a few moments and Ubuntu will display a list of potential matches. Select the city that matches your location and then click the
Type the nearest major city so Ubuntu will know your location and adjust for your time zone A list of matching locations will pop up; select the nearest one that matches your time zone
button.
- The next screen will let you select your keyboard layout. If you’re in the USA, leave the settings to their defaults and click to continue.
- After selecting your keyboard, you’ll need to enter your name, a name for the computer, a username, and a password. Go ahead and fill those out (you must enter a password), then select the “Log in automatically” option if you don’t want to have your VM locked down (I’m not worried about security on my VM because I won’t be keeping any sensitive data on it). Once your information has been entered, click to continue.
Enter your name, a name for your computer, a username, and a password - Ubuntu will now finish the installation and configuration. While that’s going on, you can browse through a brief slideshow that highlights some of the features in Ubuntu.
Use the left and right arrows to view a slideshow that highlights some of Ubuntu's features - Once the installation is complete. Ubuntu will need to be restarted. Click the button to reboot the VM.
- When the VM reboots, it will still be attempting to boot from the Ubuntu installation .iso file if you haven’t removed or unmounted the installation disc. If the screen below appears, remove the disc from the optical drive (or unmount the .iso from the virtual optical drive) and press
When this screen appears, remove the installation media and press Enter
to continue.
- After a few moments, the VM will boot into a fresh installation of Ubuntu!
- At this point let’s take a break from installing and configuring things, because now is the perfect time to save a snapshot of the VM. It has a fresh installation of Ubuntu, so we’d like to be able to revert to this point in case we ever mess something up and need to start from scratch. By taking a snapshot, we won’t have to go through the installation process again; we can just load this snapshot and go from there. To create the snapshot, go to the Snapshot.”
Go to Machine > Take Snapshot... to save a snapshot of the VM at this point
menu for the VM and select “ - In the pop-up window, enter a name and description, then click to save the snapshot. If we ever need to restore the VM to this point, the tab on the VirtualBox main screen will allow us to do so.
- Now that our snapshot is saved, let’s install the VirtualBox guest additions to enable additional functionality (such as different resolutions) within the VM. Click on the Install Guest Additions” to mount the guest additions .iso file within Ubuntu. A CD/DVD icon will appear on the desktop (if it doesn’t, open the Places menu and verify that you can see the VBOXADDITIONS_…” CD/DVD below the “Computer” menu item; if it’s there, you’re good to go). menu, then select “
- Now we need to run the installation. Double-click on the VBOXADDITIONS icon to open it (or go to Places > VBOXADDITIONS…). Right-click on the “VBoxLinuxAdditions-x86.run” file and select “Open With Other Application…”
Open the VBOXADDITIONS media Right-click on VBoxLinuxAdditions-x86.run and select "Open With Other Application..." - Choose the “Autorun Prompt” as the program to open it with, then click .
- Ubuntu will prompt you to confirm that you want to run the file. Click to continue.
- Because the VBoxLinuxAdditions-x86.run file makes changes to the system, you’ll need to provide your password to run it. Enter your password and click to run the installation.
- The installation will take a few moments to run. Once it is complete the installation window will say “Press Return to close this winow…” Press to complete the installation.
- Now restart Ubuntu so the new changes can take effect.
- When Ubuntu reboots, you should notice that it is running at a higher resolution than before. This means the guest additions have installed successfully! Open the CD/DVD Devices > Unmount CD/DVD Deviceto remove the VBOXADDITIONS virtual media and get rid of its icon on the desktop; we won’t need the guest additions media any more now that it has been installed. menu and go to
- You may notice the Update Manager running in the taskbar. If you do, open it and install any updates that are available (you’ll be prompted to enter your password). Depending on how many updates are available, it may take several minutes to download and install all of them. Once the updates are finished you’ll need to restart Ubuntu again.
- After any updates are complete, now would be a great time to take another snapshot of the VM so we don’t have to re-install the guest additions in the future.
Ubuntu is now fully installed on the VM! The last phase in this project will be to install the web server software needed to run WordPress.
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