Alternative approaches

Last updated on
19 March 2025

This documentation is deprecated.

The recommended Drupal local development environment for Linux, macOS, and Windows is DDEV. Follow the instructions to install Drupal using DDEV for local development.

Instead of installing and configuring the below on your machine directly you might consider using a Virtual Machine (VM). This approach might be advantageous:

  • to set up the same system as a production server as it saves time to solve incompatible deployment issues. For example use a Vagrant declarative configuration file that describes all your software requirements, packages, operating system configuration, etcetera.
  • when you are on a non-unix-like OS (Windows).

You can use a VM side-by-side with the setup described in this article, even running local websites on them simultaneously. Use a local AMP stack for module development on a "clean and mean" local Drupal website. When using a VM you will experience it being slower than your local AMP so make sure your system is powerful enough (CPU, RAM, SSD). Check out Drupal VM but there are many others as well.

DEPRECATED: Not recommended any more.

You can also go with XAMPP. How to install XAMPP Server in Ubuntu 16.04 (seems still valid for 18.04, open for discussion). See if some of the reasons NOT to use XAMPP apply to your use case.

A more recent way to go is a Docker-based development environment. It is faster when compared to using a VM, at least on Ubuntu that can run Docker "natively" without a VM. Check out Docksal but there are many others as well.

Drawbacks of VMs and Docker

The more virtual machines you have running simultaneously, the slower everything will get, even if no page requests are made. A native running project does not suffer these limitations unless you also subject each project to a heavy load. On a developer machine, this is unlikely unless you are doing a stress test on purpose. If you need to switch between multiple projects frequently, then running native LAMP is more appropriate. Think of Drupal contrib development on D7, D8, and D9. Starting a VM takes precious time, especially when dependencies need to be pulled in.

Remember that a local LAMP as described here can "live" alongside a VM and/or Docker without issues. Apart from LAMP being the most performing solution, it also gives you the best understandable control over what is going on. VMs and Docker environments will do a lot of tasks for you and therefore perform operations that you might not fully understand. That might become frustrating for developers if the system is not running as they expect.

The setup described on the pages of this guide gives you a better understanding of what is going on "under the hood". It can be used just for training purposes, running Ubuntu natively or on VirtualBox. Set up a local development environment yourself at least once and debugging a VM or Docker will become easier.

Another drawback is the fact that a VM is only aware of the file system within the VM itself. A local install can check the status of all files in a system, including those that are used within different VMs. If you use a Drupal module capable of monitoring multiple projects on your machine, like GIT Info Report, it can "watch" all your projects if it runs natively on your OS. Within a VM it can be used only for the file system the VM has access to, usually just one project.

Other resources


NextSet up a local development environment >>

Help improve this page

Page status: Deprecated

You can: