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!
UpdraftPlus – The supreme solution for WordPress backup
Hello friends,
We are back on the topic related to backup! As you know this is a very important thing related to each website or web project. And when it comes to a CMS system like WordPress where you are presented with regular updates then you should really take into consideration the best practices for creating and restoring backups.
In this post I will present another solution that can be easily marked as a supreme solution. This WordPress plugin is called UpdraftPlus.
What this plugin does?
UpdraftPlus is a solution for backup and restoration. Simple as that but in the mean time it offers a vast majority of important options that will ease your backups and increase your overall data protection in case of a failure related to your database or files.
So to summarize the main functions of UpdraftPlus – it is a supreme solution that will take care for the backups of your WordPress files and database and it will also aid you in their restoration in case of website failure and data loss.
Why I should choose UpdraftPlus instead of the many other plugins for WordPress?
This post is not a comparison between the different plugins. So in most cases you might be safe if you use any of the high-rated backup solutions that are available on WordPress.org.
However you will find that UpdraftPlus will be working extremely fast and well with your WordPress website. It is also extremely easy to use solution that will be suitable even for beginners which is another plus.
So let’s point out all of the features that you will get when you download, install and activate UpdraftPlus:
- Simple backup and restoration procedures – suitable for beginners;
- Various backup destinations – FTP, Amazon S3, Dropbox, Google Drive, Email and many others. This is probably the plugin that offers most options regarding the backup destination;
- Single click restoration of your backed-up files and database;
- Backup scheduler that you can set for specific times and for specific tasks – for example you can schedule only the backup of your files or only your database;
- By using this plugin you also get the UpdraftCentral which is a tool for remote control of your backups on every website that you administer with a single dashboard. UpdraftCentral serves for self-hosted projects and also for hosted for you websites;
- UpdraftPlus does not surrender easily in case of a failed upload. This plugin ensures the automatic resumption for them and continues to try once again in order to serve you at its best;
- UpdraftPlus also allows you to split the backups of large websites into multiple smaller archives;
- If you intend to backup only specific files then UpdraftPlus will allow you to select them. For example you may want to make a backup only for your plugins or content;
- The same applies when it comes to restoration of a backup. You are able to select only those components that you consider broken and they will be the only ones restored to your website. This saves time and reduces the server load;
- If you want to download your backups instantly then you can do this right from your WordPress dashboard;
- If you are a developer or you work with developers then you will be glad to find out that UpdraftPlus offers you a complete log for each backup process. This is available because of the Debug mode functionality of the plugin;
- UpdraftPlus is suitable for different languages and more translations can be added to the plugin. This makes it a perfect solution for multilingual websites as well;
This plugin is suitable for all current PHP versions. UpdraftPlus also offers a premium version that extends the backup and restoration power by adding more backup destinations and features. UpdraftPlus can also serve as a duplicating solution for whole websites. This means that if you intend to move your WordPress from one host and/or domain to another then you can rely on this plugin to aid you in this task.
The premium version of UpdraftPlus also offers great support and you can also contract professional support for any enterprise projects that are utilizing the power of WordPress. And if you are using another backup solution then you will be glad to find out that UpdraftPlus can aid you in restoration from a backup made by it. This is very useful if you want to restore your website to an earlier version before the first backup created using UpdraftPlus. Currently you can benefit from this feature if you are a premium user and if your old backups are created from BackWPUp, BackupWordPress, Simple Backup, WordPress Backup To Dropbox.
The premium version of UpdraftPlus also provides options for encryption of the database backups in order to improve their security.
This plugin is with the highest ranking on WordPress.org. So it is safe to say that your website should be in secure hands if you are using UpdraftPlus. We are speaking for more than 700,000 active installations. I am also using this solution for several websites and I am very satisfied with its performance.
UpdraftPlus will help you ensure your investment in your website by providing you with high-quality backups that you can instantly restore in case of a problem.
More on the UpdraftPlus usage can be seen on this video:
What do you think friends? Will you give UpdraftPlus a try? Or maybe you have questions? Feel free to write them in the comment section below. Don’t forget to share this post on social media.
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.