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).
- 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).
- Windows will prompt you with a security warning when VirtualBox installs the network service. Click to continue.
- The installation should now run without any more prompts or warnings. Once it is complete, click the button and launch VirtualBox.
- Now we’re ready to set up our first virtual machine! On the VirtualBox main screen, click the button.
- Click the 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.
- 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).
- 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 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.
- You’ll see a Summary screen confirming the settings you just chose. Click the 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. 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.
- Click 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