Intro
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.
After a fresh install of the latest and greatest Ubuntu on your lap- or desktop you still need to set it up to act as a server to be able to host and run local websites to do your development work. This guide describes how to set up the LAMP stack (stands for Linux, Apache, MySQL, and PHP) by installing the packages separately on Ubuntu, which might run on your machine directly, or using a Virtual Machine (VM, attention: deprecated) running Ubuntu on another OS.
To have a comparable "native" AMP stack on Mac's OS X look at Install Apache, MySQL, PHP & phpMyAdmin on macOS Big Sur 11. After that, most of the rest of this guide also applies to Mac users.
Keeping up-to-date the necessary steps is however like shooting at a moving target as every six months a new Ubuntu version is released. Therefore:
- the latest Long Term Support (LTS) version is targeted that gets released every two years, currently Ubuntu 24.04 LTS (Noble Numbat). The instructions are (until now) unaltered compared with 16.04 LTS. Feel free to add notes if you find that any updates are needed.
- for most steps, a link to a clear manual is provided instead of replicating the text
- the default setup is used as provided by Ubuntu, for example, the location of the local sites (/var/www/html)
- only the most common setup is included, for example using Apache and not Nginx
- it is limited to only getting a basic Drupal 8 site running locally and some additional setup related to development.
To verify correct implementation, a test after each step is provided with the expected output.
Do not get intimidated by the length of this guide. To have a working Drupal site running locally you only need the first couple of chapters. The rest has more of a Get What You Need approach and likely works also on non-Linux systems.
Besides the links to needed install instructions, you'll find links with tips or more information about certain topics. Revisit a page to read them bit by bit to deepen your overall knowledge of development environments.
Next: Alternative approaches >>
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion