WP-Sandbox — WordPress Virtual Appliance
Virtual appliance is a new way to test and deploy web applications quickly. With the advanced in desktop computer technology, it is now possible to run virtual machines on desktop. WP-Sandbox (WordPress Sandbox) is my pilot project to bring WordPress to more users, theme and plugin developers.
I’ve been wanting to create one for some time, mainly because I like to hack around, but also because there is a demand out there.
So, before proceeding further, what the heck is virtual appliance?
Virtual appliance is basically a pre-installed and pre-configured operating system and software environment on top of a virtual machine. The virtual appliance can then be distributed and run on any virtual machine around the world.
Why WP-Sandbox Virtual Appliance?
What are the benefits of WordPress virtual appliance?
- It saves time, money and resources. WP-Sandbox eliminates the need to install, configure and run complex stacks of software. By downloading WP- Sandbox, you can be up and running in a few minutes.
- Easy deployment. Just download the virtual appliance and unpack it. You are then ready to run the new appliance on a local machine or load it up in a virtual infrastructure.
- Experiment. Rather than using your production server for testing, you could test new version of WordPress locally. You don’t need to worry about breaking your production server or mess with your desktop. Virtual appliance runs separately from your desktop in a virtual machine.
- Small memory footprint. WP-Sandbox runs with 128MB of RAM, with more than half of it is free for other uses.
- Free. Not only the appliance is available at no cost, WP-Sandbox also runs on VMware Player, the free desktop virtualization software application. While cloud hosting like Amazon EC2 allows you to deploy a WordPress server quickly, it is not free by any means.
- Convenient. You can choose to experiment with another instance of WordPress installed under a sub-directory of your main web site / blog, but having a local instance available for testing can be much more convenient.
This makes WP Sandbox ideal for you, if you are:
- Looking forward to test WordPress as a web publishing platform before deployment.
- Planning to use WordPress within the intranet.
- Considering to upgrade to a major new version but want to make sure there is no glitch during deployment in a production server.
- Experimenting with various WordPress themes and customization locally.
- Developing a WordPress plugin that involves messing with unstable code.
How to Deploy a WP-Sandbox
WP-Sandbox runs on at least VMware Player and VMware Workstation. The former is available for free from VMware web site.
You need to install VMware Player first (available for Windows and Linux). Mac users need to purchase VMware Fusion, which costs about $80 per license (as of this writing). This is a one time process so once you’ve done it, you may run as many virtual appliances as you wish.
Here are the steps you need to take once you have VMware Player installed:
- Download WP-Sandbox. (~250 MB, 7-zip format) This link will always refer to the newest version.
- Unpack the archive. It is not a typical zip format. If you don’t have WinRar/WinZip that supports this type of compression, you may download a free copy of 7-Zip to extract the files in the archive. You need at least 1GB of free space. The root disk is almost 900MB and the data disk is about 40MB. You can put up to 15GB worth of data in the data disk.
- Run WP-Sandbox. Either load the .vmx file in VMware Player or double-click WP-Sandbox.vmx.
- Login and jot down the IP address. WP-Sandbox automatically sets IP address of the virtual appliance with DHCP. Login with the information below and run ifconfig eth0 to get the IP address of your new virtual appliance.
- Add the IP address to your host file. Add the IP address with the name of the host — as you like — to C:\Windows\System32\Drivers\etc\hosts.
- Open WP-Sandbox from your browser. Use the IP address or newly assigned name. The WordPress installation resides in the /wp27/ directory. Your WordPress Dashboard is available in [yourhostname]/wp27/wp-admin/. If you haven’t yet logged in, WordPress will ask you to do so. Use the user and password below.
- Enjoy! That’s it, now you are free to play around.
Important information to access WP-Sandbox:
- Login with wordpress, password wordpress.
- MySQL root user’s password: wordpress.
- WordPress database information: user wp27user, password wordpress.
- WordPress login: user admin, password wordpress.
Run commands with the root privilege using sudo.
Transferring Files to and from WP-Sandbox
SSH and SFTP are available. That means you can login via SSH or transfer files with SFTP.
All data files reside in /datadisk. The root directory of the web document is /datadisk/www/nginx-default. You will find wp27 there, which is the WordPress installation.
The whole web root directory is owned by the user wordpress so you may copy and delete any files within it. One exception is the wp-content/uploads directory, which is owned by user www-data (and group wordpress) so WordPress may upload files to the directory while still allowing you to upload and delete files from an SFTP session.
Facts and Details about WP-Sandbox
- Current version of WP-Sandbox includes a fresh installation of WordPress 2.7. Future versions may include features that allow users to test cutting edge versions of WordPress easily.
- WP-Sandbox is based on Ubuntu 8.10 Intrepid, which is a distribution of Linux. That’s why I am able to distribute the whole appliance for free.
- Instead of using Apache, WP-Sandbox utilizes nginx, a lightweight and fast web server software. Nginx makes it possible to fit the entire system into low memory footprint. (Yes, I know lighttpd and other alternatives, but nginx happens to be my favorite.)
- WP-Sandbox doesn’t include a web administration interface (yet), but most likely you don’t need it. This virtual appliance is plug and play, and you can use desktop software to transfer files in and out of it.
- Test is limited on Windows XP. I appreciate if you report back if you have successfully run it on different platforms. (Most likely it will run flawlessly with Linux as the host operating system as well.)
Return to How to Make a Server — Building High Performance Server
Return to Blog Tips for a Better Blog — Blog Building University.