Where to find pre-installed virtual machines for local WordPress testing under Virtualbox?
Hello friends,
If you remember our post about virtual machines running under Virtualbox then you are probably wondering if it is possible to find pre-installed solutions that you can import and start using for local WordPress tests.
The great news is that this is possible. In this post I will show you where you can find pre-installed virtual machines for local WordPress testing under Virtualbox.
If such solutions exist, should I use them instead of configuring an Ubuntu (or other) server under Virtualbox by myself?
In terms of local testing – yes. But if you are aiming to use them for other purposes, I’d advise to either start installing or configuring the server by yourself or at least to check the configuration of the pre-installed solution and improve it if necessary. For production servers, based on virtual machines, I’d advise to seek for assistance from an experienced system administrator. Let’s not forget to mention that there are far more advanced solutions than Virtualbox for this purpose (for example Open Stack).
The reason that I am giving you this advice is because the pre-installed solutions are meant to save you time and effort. This may be enough for local testing in most cases, however for other purposes these virtual machines might lack in security. Also even for local WordPress testing you may need to configure them additionally in order to make all of your plugins function correctly.
OK, where can I find these pre-installed virtual machines?
Some of the machines contain only a Linux distribution without any additional configuration. These machines are meant to remove the need to make a new installation and basic configuration. Once you download them and import them in Virtualbox you can install and configure LAMP so that you can run WordPress locally.
Such machines can be found from OSBoxes (click to visit). There you can find images for both Virtualbox and VMware. Select the distribution that you desire to use and then follow the instructions provided on the website. You will find out the username and the password that were created for the virtual machine.
Here is what you need to do in order to use the machine: Add a new virtual machine in Virtualbox. Select the appropriate distribution and then follow the wizard until you reach the section that asks you to either create a new virtual disk or to use an existing one. Simply point the VDI or VMDK file that you have downloaded from OSBoxes and complete the virtual machine configuration. Once you run it you will get a pre-installed Linux with graphical interface. For additional configurations you need to update the distribution and also install VirtualBox Guest Add-Ons. Then you need to install and configure LAMP.
Other solutions provide LAMP Stack in a pre-installed virtual machine. Once you import/add them in Virtualbox you need to follow additional steps and apply a few settings and then you will be able to configure your databases and run WordPress locally. Turnkey Linux provides such machine. You can download it from here.
Finally there are solutions that even contain WordPress within them and you can start adjusting the sample local site right away. Turnkey Linux has such a machine which can be downloaded from here.
Another option is to use a Bitnami virtual machine. You can grab one from here.
From this website you can download another pre-installed WordPress virtual machine.
So there you have it friends. Will you use pre-installed virtual machines or will you try to configure your own one? Share any thoughts on this topic in the comment section below. If you have any questions – we will be happy to assist you.
See you soon, friends!
What should you use for your local WordPress tests and development? XAMPP or Virtualbox? Find out now from this post:
Hello friends,
In this post I will present to you two of the most popular solutions for local WordPress tests and development. They are suitable for beginners and medium-skilled users.
The solutions that I am about to review in details are called XAMPP and Virtualbox.
But first things first! Why would you even consider using a solution for your local WordPress tests and development?
Because this may save you valuable time and effort as well as it may prevent some potential problems when creating a WordPress website directly on the production server with the real domain name.
Let’s imagine that you can build a simple WordPress website for a couple of days or a week at most. If you begin this process directly on your production server this means that you will have to purchase it in advance. This is also related to the purchase of a new domain name if you do not have an older one for test purposes that you can use to the production server. So in most situations you will have to spend money and then start building your website from scratch.
If you are a complete beginner you may allow search engines to index your website when it is under development. In some cases this might cause potential problems with re-indexation later on. And if you are preventing the bots from indexing your project then you are wasting a week with a paid domain and hosting without getting any initial SEO results. And if something goes wrong you will have to start from scratch once again (in case you do not have backups) or start from a backup. But this will slow things even more.
Now imagine if you need to build an advanced website using WordPress. You can guess that you will need more time and the risks of breaking something are increased as well.
While the time and effort might still be the same when developing locally, you are saving time, effort and money for yourselves or for your clients for the SEO and digital marketing for the website. Why? Because it is better to upload and set up a complete WordPress installation that may launch immediately and start getting visits.
All of the above reasons were related to the creation of new websites. But what about your existing one when you need to try a new plugin? Doing this directly on the production server comes with a risk of breaking the theme or the functionality of the website due to incompatibilities. The latter might be PHP related, plugin related, theme related and etc.
Once again it is better to do tests locally and when the results are as expected to apply the changes on the production server.
OK, I am convinced! What is the difference between XAMPP and Virtualbox and what do I need to start developing or testing WordPress locally with them?

XAMPP is a project that provides you with a local server powerful enough to launch your WordPress website and easy enough to be the most suitable solution for beginners. All you need to do is download it from apachefriends.com and install it. You will find builds for Windows, Linux and OS X. After you are done installing you need to create a new directory under htdocs. In this directory place your WordPress installation. Lets assume that you call it localwp.
Start the XAMPP control panel and launch PHP and MySQL.
Then create a database using the built-in PHPMyadmin and edit wp-config.php with the needed information. After this you can access your local website in your browser by typing localhost/localwp (the name of the directory that you created).
Now you may begin developing a new website or testing your current one by transferring a backup copy to the local website.
In some situations you will need to adjust some settings but there are lots of tutorials online on how to achieve this. Also XAMPP makes it super easy to do this.
For more information, please view the following video:

Virtualbox is an open source solution that will allow you to run virtual machines on your computer. Download it from here: www.virtualbox.org
In our case you might want to install Ubuntu server (or similar) and configure it locally. In this virtual server you can begin developing or testing your WordPress website.

VirtualBox 5.0 for Windows. Within VirtualBox Ubuntu 14.04 is running. The image is embedded from the official Virtualbox’s website.
There are many guides on how to achieve this and it is not that hard. However I’d recommend this for medium and advanced users as beginners might face some problems and difficulties.
What are the advantages and disadvantages of each of these solutions?
I will make the comparison based on the following criteria:
- Speed and resource usage – in my opinion a virtual machine using Virtualbox and Ubuntu server is running faster and is saving more resources than XAMPP. However this might be different for you as it depends on your hardware configuration.
- Ease of usage – XAMPP is easier for beginners.
- Flexibility – XAMPP is limited to the PHP and MySQL versions that come with the current build. On the other hand the virtual server under Virtualbox will provide you with enough flexibility to choose exactly the tools that you need for your website.
- Possibility to add control panels – this is not a problem for the virtual server running under Virtualbox. A control panel provides more options and makes you feel like you are working on the real production server.
- Access from clients and other users – both solutions can do this. For XAMPP you will need to add your IP address as WordPress address in the admin panel of your website and save the permalink structure. Then instead of using localhost you can use your IP address and thus the local site can be accessed.
Virtualbox however makes this easier and the website can be accessed by IP by default. You do not need to make changes to your WordPress admin panel. But what is more important is that Virtualbox and Ubuntu server can allow you to create multiple virtual hosts. For each of them you can have a stand-alone website that can be access by your clients and other users. All you need to do is to set the local domain names under your hosts file and by pointing your IP to each of them. Then you need to instruct your clients and users to do the same and the local websites can be accessed. For these cases I like to use .loc domain names. They are not real but for the purpose of local tests they are great. You can use whatever domain names you want. For example – .dev, .test and so on. When the website is completed and transferred to the production server the only change in the database for the domain name will be the end part. For example from .loc to .com.
So these are my criteria for comparing the two solutions. What do you think friends? Which one is the most suitable for you?
Before I end this post, I’d like to share some useful links with you:
- How to Install XAMPP and WordPress Locally on PC/Windows
- How To Install WordPress with LAMP on Ubuntu 16.04
- How to move your WordPress website
- Final migration touches for the WordPress database with Search & Replace. Find out how to place things in order:
See you soon, friends!
Installing WordPress on Ubuntu LAMP
In this tutorial we are going to install a wordpress website on a LAMP stack. WordPress is the most used CMS worldwide so it’s a great pick for testing our LAMP configuration. If you don’t have a LAMP stack installed you should check this article-Installing LAMP on Ubuntu
Create a database and a username in MySQL
First we need to create a database and a user corresponding to it in MySQL. In order to do that we need to log in to the root administrative account in MySQL. Type the following command:
mysql -u root -p
You’ll be asked for the password for the MySQL root user. Enter it.
Now you have access to MySQL. We are going to make the wordpress database. Use this command
CREATE DATABASE yourdatabasename;
We have to make a MySQL user for the database that we have just created and assign it a password.
CREATE USER yourusername@localhost IDENTIFIED BY 'yourpassword';
Now we have to assign the newly created user to our wordpress database. In order to do that just type:
GRANT ALL PRIVILEGES ON yourdatabasename.* TO yourusername@localhost;
We have to flush the privileges in order for MySQl to know that we have made changes
FLUSH PRIVILEGES;
We can exit mysql
exit
Download WordPress
In order to download the most recent and stable version of WordPress type the following:
wget http://wordpress.org/latest.tar.gz
This will download a compressed file containing the wordpress installation files and folders. We have to extract those files into our home directory.
tar xzvf latest.tar.gz
We have to install some additional modules in order to be able to install plugins in WordPress using our SSH login credentials.
sudo apt-get update sudo apt-get install php5-gd libssh2-php
Move WordPress files to Document root
In order for your website to be accessible you have to move your wordpress files to Apaches document root. The location of document root is /var/www/html/
It’s a good idea to create a separate directory for your wordpress installation. This way you can install multiple websites in your document root.
sudo mkdir /var/www/html/wordpress
sudo rsync -avP ~/wordpress/ /var/www/html/wordpress
Now your wordpress files are moved to your document root thus making them accessible for your visitors.
After that remove the wordpress folder and latest.tar.gz in your home directory
rm latest.tar.gz
rm -rf wordpress
Our next task in to make changes to the wordpress config file
Configure WordPress
Navigate to /var/www/html/wordpress
We have to copy the wp-config-sample.php to wp-config.php and to remove the wp-config-sample.php
cp wp-config-sample.php wp-config.php rm wp-config-sample.php
Let’s open the wp-config.php and change some fields.
vim wp-config.php
There are some fields which you need to change. We are changing them with the database and user in MySQL that we have made a while back.
define('DB_NAME', 'yourdatabasename');
define('DB_USER', 'yourusername');
define('DB_PASSWORD', 'yourpassword');Save the file and exit.
Now we have to give our server access rights to our wordpress directory. If we don’t do that we won’t be able to update plugins upload images etc.In order to accomplish that we have to login as root.
su
Enter your root password
sudo chown -R www-data:www-data /var/www/html/wordpress
Return to your normal user account
su - yourusername
We have to grant read access to our general directory. In order to do that type:
sudo chmod -R 755 /var/www
Modifying Apache
In order to associate the domain we chose for our website with it’s proper location we have to make some changes
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/wordpress.conf
Now we have to edit wordpress.conf
vim wordpress.conf
We need to add the following lines
ServerName yourdomain.com ServerAlias www.yourdomain.com
Also we have to change this to your E-mail in order for you to receive E-mails
ServerAdmin [email protected]
Save and exit
We need to enable our website
sudo a2ensite wordpress.conf
In order for changes to take effect type
sudo service apache2 restart
To access your wordpress installation type the name of your domain in your browser and follow the installation instructions.
If you want to use wordpress pretty permalinks feature you have to make some changes in the host file.
vim /etc/apache2/sites-available/wordpress.conf
You have to add those lines bellow DocumentRoot /var/www/html/wordpress.
AllowOverride All
Save and close. Next we need to enable the rewrite module. This enables you to rewrite URL’s
sudo a2enmod rewrite
restart the apache web server
sudo service apache2 restart
We need to create a .htaccess file in order for wordpress to write changes to it.
sudo touch /var/www/html/wordpress/.htaccess
To make the web server the group owner type
sudo chown :www-data /var/www/html/wordpress/.htaccess
Our last step is to give the .htaccess file the right permissions
sudo chmod 664 /var/www/html/wordpress/.htaccess
You can enjoy your newly installed WordPress website. Cheers!
Installing LAMP on Ubuntu
LAMP is an acronym which consists of: Linux (in our case Ubuntu), Apache web server, MySQL database for storing our website data and PHP for handling the dynamic content.
Creating a non-root user with super user privileges
Before we begin with the installation of the LAMP instance we have to make sure we have a non-root user with super user privileges. This step is important because in Linux managing your system while logged in as root user is considered bad practice. The reason behind this is that the root user has very broad privileges which allow him to gain access and to execute critical commands-commands that can possibly lead to system failure.
In order for us to make a non-root user with super user privileges we need to be logged in as a root user.
Type su in your shell for logging in as root user.
su
If you don’t have a root account you have to create one.
In order to do so you need to run the following commands
sudo passwd root
You will be prompted for a password for your root account. Then you need to execute the following command in order to unlock your root account.
sudo passwd -u root
Now let’s create the user. Execute the following command:
adduser yourusername
You’ll be asked some questions. Other than the password the other fields aren’t mandatory.
In order to give your user root privileges execute the following:
gpasswd -a yourusername sudo
This will add your user to the sudo group. As a consequence every time when you run a command starting with sudo you’ll be executing it with root privileges.
In order to log in with your newly created user type this:
su – yourusername
Now let us get back to installing the LAMP instance.
Installing Apache Web Server
First we need to install the Apache web server. We’ll be using the Ubuntu repository for the task.
First we have to make sure that our repository is updated. We should run the following.
sudo apt-get update
After our repository has been updated we are ready to install the apache web server. Type this command:
sudo apt-get install apache2
Now our Apache Web Server is installed. To check if your Apache web server installation was successful type your server ip address in your browser. You have to see the Apache2 Ubuntu Default Page.
If you don’t know your server public ip address type the following:
Ip addr show
Next to inet you”ll find your ip address
Inet youripaddress/
When a directory is requested by default Apache first looks for index.html. We want to change that so as a result apache will look first for index.php. To do so type this:
sudo vim /etc/apache2/mods-enabled/dir.conf
We want to move the index.php in the first place next to the DirectoryIndex
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
Now we need to restart the Apache web server in order for our changes to take effect.
sudo service apache2 restart
Installing MySQL
MySQl is a database management system. With it you can easily store, access and organize your website information.
We need to run the following command in order to install MySQL:
sudo apt-get install mysql-server php5-mysql
During the installation you’ll be prompted for the MySQL root user password. Just generate one and enter it. After the installation we have to generate MySQL database directory structure.
sudo mysql_install_db
After that we have to run a security script in order to secure our MySQL installation.
sudo mysql_secure_installation
Remove the anonymous user, disallow the remote root login and remove the test database. After that reload the privileged tables. That’s it.
Installing PHP
PHP is going to be used in order to display our dynamically generated content. Again we are going to use the apt-get.
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
Now our php package has been installed. Php comes with optional modules you can install. In order to search them up type:
apt-cache search php5-
From the additional modules we will install php5-cli- command-line interpreter for the php5 scripting language.
sudo apt-get install php5-cli
Our last task is to test how php handles things. We have to create a test file in a specific directory (web root). on our server.
sudo vim /var/www/html/test.php
Now we want to put the following and to save the file:
<?php phpinfo(); ?>
In order to test our php we need to navigate to the newly created test.php file in our browser.
http://your_server_IP_address/test.php
You have to see something like this:

In order to keep your server secured you should remove the test.php file
sudo rm /var/www/html/test.php
Now you have a working LAMP instance ready to host your websites.