Skip to main content
Home
Nicholas Mangold

Main navigation

  • About
  • Projects
  • Blog
  • Contact
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Blog

How to set up a local Drupal environment

A local Drupal environment can be created in many different ways. I recommend this approach for many reasons. Most of all, this method is used by many of the top professionals to develop enterprise Drupal sites. Additionally, it's automated, and easy enough for a beginner to get started, without worrying about all the technical details. At least, not to start (smirking). If this still seems too complicated, I recommend starting with Acquia Dev Desktop. Update: Acquia has ended support for Dev Desktop on June 30, 2021 in favor of their Cloud IDE which requires a paid subscription. DrupalPod is a fairly easy way to get started with Drupal. However, that solution is running a container in the cloud, which has drawbacks. So, it is not the same as running a local enivornment.

Requirements

This method uses Acquia BLT, and Drupal VM, among other tools. To get started, you will need Composer, Git, and PHP installed. If your machine already has those installed, skip to the next section, Building your local environment. Otherwise, refer to the Acquia BLT documentation for Installing dependencies. It may not be obvious to some, but there are tabs in that section for different operating systems. Make sure to follow the instructions for your operating system.

Windows users: Unfortunately, you will also want to learn about the main gotchas and optimization tips for running on a Windows host. Please, review the following:

  • https://docs.acquia.com/blt/install/windows-install/
  • http://docs.drupalvm.com/en/latest/getting-started/installation-windows/

Build your local Drupal environment

Simple. In a terminal, navigate to the directory where you want the project created, and run the following, chained commands, in your terminal. This process may take a while depending on the speed of your internet connection. Eventually, you will be prompted to enter your admin password. So, the URLs associated with your local Drupal site can be added to your hosts file.

composer create-project --no-interaction acquia/blt-project my-project && cd my-project && blt vm --no-interaction

I chained these commands together, using && in between commands, and added the --no-interaction option to appropriate commands. So, you will not be prompted during the set up. Everything happens automatically. If you want to see these prompts, and have more control throughout this process, then run each command individually, and without the --no-interaction option.

Install Drupal

If everything went well, you should be able to view your local instance at http://local.my-project.com/, and continue the installation using the Drupal installation UI.

Please, leave a comment to let me know if these instructions were helpful for you, or if you ran into any issues. Cheers!

Tags
Drupal 8
Acquia BLT
Drupal VM
Drupal
About text formats

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Certifications

Badge for the Acquia Certified Developer - Drupal 7 certification
Badge for the Acquia Certified Front End Specialist - Drupal 7 certification
Badge for the Acquia Certified Back End Specialist - Drupal 7 certification
Badge for the Acquia Certified Grand Master - Drupal 7 certification

Recent Projects

Argonne National Laboratory

Screenshot of the Argonne National Laboratory homepage

Texas OAG

Screenshot of the Texas OAG homepage

Siemens PartQuest

Screenshot of the  Seimens PartQuest homepage

DODEA

Screenshot of the DODEA homepage
View more projects

Recent blog entries

  • How to use sudo with Touch ID on macOS Sonoma 14.x and above
  • Drush throws an "Access denied; you need (at least one of) the PROCESS privilege(s)" error message
  • Troubleshooting "ERROR 1227 (42000) at line 18: Access denied; you need (at least one of) the SUPER privilege(s) for this operation"
  • How to set up a local Drupal environment
  • How to use sudo with Touch ID on a Mac
View more blog entries
RSS feed
Powered by Drupal