LAMP as an Alternative to XAMPP and WAMP
In my opinion, the closer your development environment is to production, the fewer headaches you will have when you deploy. For example, developing on a case-insensitive operating system such as Windows can cause all sorts of issues when deploying to a case-sensitive system such as Unix. However, as a web developer, you may not be able to move completely to a Unix-based operating system. Many website clients use Windows, which means testing in Internet Explorer, and you may also need applications such as Photoshop. Because of that, I moved away from Windows-based stacks such as XAMPP and WAMP in favour of a virtual Ubuntu server. I feel this gives me the best of both worlds while improving productivity.
The main drawback is that you need to be comfortable with the Unix command line. Once you have a basic knowledge of Unix, however, it becomes a much better approach. This setup has saved me so much time, and it also allows you to better access things such as APC cache functions. All the main tools are available in Ubuntu, such as Xdebug, and they can work against a remote machine. You could use another full tower PC, but VirtualBox lets you snapshot your work and environment. I also like not having another PC running and drawing power. I have successfully used this setup both on my desktop itself and from my server.
The key technologies I use
- Oracle VirtualBox (on Windows)
- Ubuntu Server (in VirtualBox)
- NetBeans (in Windows)
- Xdebug (in Ubuntu)
- smtp4dev (Windows only)
Ubuntu makes it simple to install a LAMP stack by providing an option in the installation wizard. The following is a brief list of things I do to maximise productivity while using a virtualized Ubuntu server. Most of them lower security so that I can integrate it with my desktop OS. It is a high-level list for now. I intend to add more detailed instructions in future posts when I have time.
Brief overview of my environment
- Depending on the network, put the VirtualBox machine behind an ICS/NAT firewall because I have lowered the security.
- Install LAMP, OpenSSH Server, and Samba File Server during the Ubuntu installation.
- Add packages such as phpMyAdmin, MariaDB, Nano, Htop, and similar tools.
- Share the root of the virtual machine's hard drive in Samba and map it to my
W:drive. This can be slow for NetBeans when indexing large or complex sites. See the hints below. - Install Xdebug, edit Apache's
php.ini, add the typical Xdebug settings, and enablexdebug.remote_enable,xdebug.remote_host, andxdebug.remote_port. Note: there is also a separate CLI version. - I am currently testing installing a mail server, such as Postfix in satellite system mode, and forwarding all email to the development machine.
That's basically it!
I feel this gives me the best of both worlds, with very few downsides and plenty of upsides. From what I have found, all the Linux-only web development tools I need work from the terminal. Most Windows-only web development tools, such as smtp4dev, can also be set up to work with a remote Unix server.
Hints
- For very large sites, WinSCP can be set up to sync files from Windows to a remote machine over SSH. This is particularly helpful if NetBeans is constantly scanning for external changes.
- NetBeans can use path mapping under
Project Properties->Run Configuration->Advanced, such as\var\www->w:\, if you have not mapped the root of the Unix file system.
Published: 17/07/2013 UTC
Updated: 18/06/2026 UTC
The opinions expressed on this website are my own and do not necessarily reflect the views of my employer. The posts on this website are provided "as is" with no warranties and confer no rights
Copyright © 2026 Jeremy Sells - See Site Terms/Disclaimer