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 for local WordPress tests and development

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 can be used for Ubuntu server installation in order to develop and test WordPress locally

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 can be useful for your local WordPress website creation and testing.

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:

  1. 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.
  2. Ease of usage – XAMPP is easier for beginners.
  3. 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.
  4. 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.
  5. 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:

See you soon, friends!