Introduction: Agile Project Management & Distributed Teams
This Tutorial will show how to install Drupal 8 on a localhost WAMP server on a desktop, laptop, or virtual machine for web development & staging for web hosting.
- Problem: How to run Drupal 8 on a laptop or desktop in a sandbox for coding sites and publish changes to a remote repository using Version Control software?
- Solution: Install Wampserver which includes the ability to run a web server on localhost with PHP, MySQL, PostgreSQL, MariaDB, & Apache/NGINX support.
Wampserver is the most popular Windows development server for running Drupal 8 locally, but other solutions can be found using VMs through VirtualBox or VMware.
Let’s get started.
Step One: Install Wampserver on the Windows Desktop
Start: The free Wampserver package can be downloaded for free at SourceForge and is licensed under open source agreements for use. To begin, navigate to:
Install: After the download, click on the .exe file and begin the installation process of Wampserver. Note that you will need to download & verify the environment for C+ support.
Next: Unpack and run the C+ support utility from the link above. The software will generate a report as to which C+ packages you need to install on your desktop to continue.
Dependencies: Visual C++ Packages - VC9, VC10, VC11, VC13 , VC14, & VC15.
Hint: if you already have a copy of Wampserver installed, it is recommended to use the Windows control panel to remove it & install a fresh version without overwriting the old files.
Next: Install Wampserver in a folder at the root of the hard drive, i.e. C:wamp or D:wamp.
Hint: Close Skype or force it not to use port 80 & Disable IIS for best results on installation.
Visual C++ Packages: “The MSVC runtime libraries VC9, VC10, VC11 are required for Wampserver 2.4, 2.5 and 3.0, even if you use only Apache and PHP versions with VC11. Runtimes VC13, VC14 is required for PHP 7 and Apache 2.4.17 or more.”
- VC9 Packages (Visual C++ 2008 SP1):
- VC10 Packages (Visual C++ 2010 SP1):
- VC11 Packages (Visual C++ 2012 Update 4):
The two files VSU4vcredist_x86.exe and VSU4vcredist_x64.exe to be download are on the same page: http://www.microsoft.com/en-us/download/details.aspx?id=30679
- VC13 Packages Update 5(Visual C++ 2013):
The two files VSU4vcredist_x86.exe and VSU4vcredist_x64.exe to be download are on the same page: https://support.microsoft.com/en-us/help/4032938/
- VC14 Packages (Visual C++ 2015 Update 3) Supersedes by VC15:
- VC15 Redistribuable (Visual C++ 2017):
Note: Make sure that you download & install all of the Visual C++ support packages from the links above & then re-run the platform checking tool before installing Wampserver.
Finish: You should see the message “All VC++ packages needed to Wampserver are installed successfully.” in the pop-up screen after finishing the check-up. Then install Wampserver.
Step Two: Download Drupal 8 Files to Computer.
Start: Navigate to drupal.org and download the latest zip or tarball of the Drupal 8 CMS core distribution. (Note: You can also use Acquia Drupal or an installation profile.)
- Download: https://www.drupal.org/download
Next: Unpack the Drupal 8 distribution files to a new folder in the C:/wamp folder that includes Wampserver. The folder should be the name of your website (example.com).
Next: From this point, the process is the same as an online manual Drupal 8 installation.
Next: Copy the sites.php & settings.php files to the /sites/default folder then run the Drupal 8 script from /localhost/www.test.com in a web browser to launch the installer.
Finish: You still need to create a new MySQL database & user on Wampserver using phpMyAdmin to complete the installation process of Drupal 8 on localhost.
Step Three: Create MySQL Database in phpMyAdmin
Start: Wampserver has phpMyAdmin pre-installed, so navigate to C:/wamp & click the .exe to launch the server, then in the left-click menu launch phpMyAdmin in the web browser.
Next: Review the installed databases & click on the link to add a new one. Use utf_16 GA as the collation standard. Then create a master user & grant all permissions, saving the settings.
Hint: You can either use “root” user & no MySQL password to install Drupal 8 on localhost or use the user+password created in phpMyAdmin, i.e. better for multi-site development.
Finish: Save the database name, user, & password then run the Drupal 8 installation script by launching the localhost development site in a web browser on the desktop machine.
Step Four: Install a New Version of Drupal 8 on Localhost.
Start: The Drupal 8 installation process on Wampserver is the same as online. Run the installation script in a web browser and enter the relevant information where prompted.
Next: Choose a Standard installation profile, then enter your database, user, & password information in the prompt screens. Add a site name, user admin account, & email address.
Hint:Wampserver now supports MariaDB, so developers who need to test that framework can easily do so in a local sandbox using this installation method.
Finish: Complete the auto-installer and navigate to your new Drupal 8 website on localhost. The site is now running from a WAMP server via Wampserver on your desktop machine.
Conclusion: Setup Version Control with Git, CVS, or SVN
After Drupal 8 has been installed on Wampserver, you can use the development environment to build complete websites locally. Upload them to the web hosting platform via Git, Subversion (SVN), or CVS using DevOps tools or use FTP & gZip to upload, unpack, & use in production.
Check out these top 3 Drupal hosting services: