Local server setup

A local server plays a pivotal role for most developers. It allows development and testing on a local machine without the concerns of losing Internet connection, accidentally creating temporary security holes, or constantly uploading files.

There are many options for setting up a local server, depending on how much you already know.

For Drupal, you need a web server, database and PHP.  You could:

  • Do everything yourself by hand. Configure Apache or Nginx, MySQL and PHP, then install Drupal on top. (You could use Composer or Drush make for the Drupal installation, or just download the .tar.gz) 
  • Use a pre-configured AMP stack, such as WAMP (for Windows), MAMP (for Mac) or XAMPP (Windows, Mac or Linux). Then download and install Drupal yourself and create an empty database.  This also makes it easier to manage multiple sites.
  • Use Acquia Dev Desktop (Windows/Mac), which will do everything for you, including downloading Drupal (you can choose which distribution) and setting up the database.  Or you can also tell it to use an existing Drupal code base.  Again, you can create as many sites as you wish.
  • Use Virtual Machines. A VM is a full, self-contained server, running in its own environment and operating system, typically with a shared document root, so you can continue to edit files on your host computer using your favourite editor or IDE.  This is a common choice for experienced developers: most Drupal productions sites are hosted on Linux servers and most Drupal VMs use Ubuntu, so you're building using a much closer environment to your web server which means fewer surprises when you deploy to production. 

    There are many Drupal VM projects using different technologies and in varying states of health.  Take time to investigate which is best for you.

    Drupal VM (Virtualbox, Vagrant, Ansible)
    VDD (Virtualbox and Chef)
    Vlad (Vagrant, Ansible)
    DrupalPro (Virtualbox, previously Ubuntu 12.04 only, but has been ported)
    Drupal-up (a Drush extension using Vagrant, Virtualbox and Puppet)
    Aegir-up (Vagrant and Aegir, no longer maintained)
    Quickstart (no longer maintained)

Windows development environment

Set up a local server for Drupal development on Windows.

Mac OS development environment

Setting up local server for Drupal on Mac OS.

Linux development environments

Set up a local server for Drupal development on Linux.

Copy and Run a Drupal Production Site on a USB Drive with USBWebserver

UsbWebserver provides a fully functional, portable WAMP stack that may be used to distribute or store a production Drupal site on a USB

Managing Mail Handling for Development or Testing

While debugging, testing or coding new features, if you want to see the content of the mails sent by your test Drupal site, your development

Easy installation of a local development server using Drush and Aegir-up

Aegir-up is a Drush extension that deploys a local instance of the Aegir Hosting System atop Vagrant and Virtualbox, for development and

How to copy site to another directory

Tutorial that describes how to copy a site to another directory for testing.

How to create a test site

Tutorial that describes the process of cloning your live site into a local development environment.

Guide maintainers