Install WordPress on a Ubuntu Virtual Machine using VirtualBox

Web Design & Development
This entry is part 1 of 4 in the series WordPress Development Environment.

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.

Download Ubuntu
Download the latest 32-bit version of Ubuntu

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.

  1. 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.

    First Run Wizard
    Starting the VM for the first time will launch the First Run Wizard
  2. Click Next to continue to the next screen, then select the host drive that has the .iso file on it. For me it was “Host Drive ‘G:’” because that is the virtual optical drive that MagicISO created. Click Nextto continue.

    Select the installation media
    Select the location of the installation media; it will be on a "Host Drive"
  3. The next screen shows a summary of your selection. If anything looks wrong you can click the Back arrow in the top-left corner of the window and select a different host drive. If everything looks good, click Finishto boot up your VM.

    First Run Wizard summary
    Click the Finish button on the summary screen to boot the VM
  4. The VM will take a few moments to boot up, at which point you’ll see a screen similar to the one below:

    Ubuntu boot screen
    This boot screen appears when the VM fires up
  5. Eventually you’ll get to a Welcome screen that allows you to select a language and either Try Ubuntu or Install Ubuntu. Because this is a VM, go ahead and click on Install Ubuntu.

    Ubuntu install welcome screen
    Select a language and choose to Install Ubuntu
  6. 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 Forwardto continue.

    Preparing to Install Ubuntu
    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
  7. On the next screen select the option to “Erase and use the entire disk” and click Forwardto continue.

    Allocate drive space
    Select "Erase and use the entire disk"
  8. 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 Install Nowto use the virtual hard disk.

    Install Now
    Only one virtual hard disk is available on the VM, so leave the default selection and click Install Now
  9. The next part of the installation will take a while. Ubuntu will copy all of the files it needs.

    Copying Files
    Ubuntu will start copying files for installation
  10. 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 Forwardbutton.
    Where are you
    Type the nearest major city so Ubuntu will know your location and adjust for your time zone

    Location selection
    A list of matching locations will pop up; select the nearest one that matches your time zone
  11. The next screen will let you select your keyboard layout. If you’re in the USA, leave the settings to their defaults and click Forwardto continue.

    Keyboard layout
    Choose your keyboard layout
  12. 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 Forwardto continue.

    Who are you
    Enter your name, a name for your computer, a username, and a password
  13. 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
  14. Once the installation is complete. Ubuntu will need to be restarted. Click the Restart Nowbutton to reboot the VM.

    Installation complete
    After the installation Ubuntu will need to restart the VM
  15. 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 Enterto continue.

    Remove media
    When this screen appears, remove the installation media and press Enter
  16. After a few moments, the VM will boot into a fresh installation of Ubuntu!

    Fresh Ubuntu installation
    Ubuntu is now ready for use!
  17. 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 Machine menu for the VM and select “Snapshot.”

    Go to Machine > Take Snapshot... to save a snapshot of the VM at this point
  18. In the pop-up window, enter a name and description, then click OK to save the snapshot. If we ever need to restore the VM to this point, the Snapshotstab on the VirtualBox main screen will allow us to do so.

    Snapshot name
    Enter a name for the snapshot and click OK
  19. 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 Devices menu, then select “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).

    Install guest additions
    Click on Devices > Install Guest Additions...
  20. 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 “” file and select “Open With Other Application…”
    Open the VBOXADDITIONS media

    Open VBoxLinuxAdditions-x86
    Right-click on and select "Open With Other Application..."
  21. Choose the “Autorun Prompt” as the program to open it with, then click Open.

    Open with Autorun Prompt
    Choose the "Autorun Prompt" to open the file with
  22. Ubuntu will prompt you to confirm that you want to run the file. Click Runto continue.

    Autorun Prompt
    Click on Run when the Autorun Prompt appears
  23. Because the file makes changes to the system, you’ll need to provide your password to run it. Enter your password and click OKto run the installation.

    Enter password
    Enter your password to run the installation
  24. 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 Enterto complete the installation.

    Installation complete
    When the installation is complete, press Enter
  25. Now restart Ubuntu so the new changes can take effect.

    Restart Ubuntu
    Open the Power menu and select "Restart..."
  26. 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 Devices menu and go to 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.

    Ubuntu with guest additions
    Ubuntu is now running with guest additions
  27. 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.

    Install updates
    Install any updates that are available
  28. 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.

Pages: 1 2 3 4


  1. Great tutorial, thanks - I've done the same with VMWare server 1 and later.... the thing that always gets me is when I set Wordpress to permanent links - it messes everything up!
  2. [...] This entry is part 4 of 4 in the series WordPress Development EnvironmentI do most of my WordPress development using a test environment that I installed on a Ubuntu Virtual Machine (VM). This let’s me play around as much as I want without any risk to my production website or my computer; everything is contained within the VM, and it costs me nothing because I only use open-source and/or free software (read about it at [...]
  3. I can recommend VirtualBox, since it is completely free and it offers pre-configurations for nearly all OS's. One thing you have to care about, maybe, is the netowrking-settings, since this stuff really *may* influence the internet-speed of the guest system, but you can fix this. Regards

Comments are closed