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!