In this article by Richard Jones, author of the book Learning Drupal 8, you will learn the steps of installing Drupal 8 using a local development environment. At the time of writing, the most up-to-date version of Drupal 8 is the beta-14 release, which can be downloaded from:
(For more resources related to this topic, see here.)
Drupal 8 is a PHP-based software application and as such requires the following:
The following PHP version is required for the installation of Drupal 8:
- PHP 5.5. or above
Web server options
One of the following:
- Microsoft IIS
One of the following
- MySQL 5.1.45 or above with PDO
- PostgreSQL 8.3 or above with PDO
- SQLite 3.3.7 or above
- MariaDB 5.1.44 (or greater)
- Percona Server 5.1.70 (or greater)
One of the following:
- Internet Explorer 9.x and above
- Firefox 5.x and above
- Opera 12 and above
- Safari 5.x and above
- Google Chrome
Up-to-date system requirements can be found at https://drupal.org/requirements.
Setting up a development environment
When you are getting started with Drupal, you may not have access to a web server in order to install it.
Often it is much easier at first to work on your own computer rather than have to worry about setting up an internet-hosted server environment by setting up a local stack of Apache, MySQL, PHP, which are often be referred to generically as AMP stacks and as LAMP, WAMP, or MAMP stacks on Linux, Windows, or Mac, respectively.
Acquia Dev Desktop
Acquia offers a free local development environment for Windows and Mac called Acquia Dev Desktop that you can download and install on your own local machine in order to run Drupal 8 in the shortest possible time.
Free cloud hosting
Acquia is a company founded by the creator of Drupal, Dries Buytaert, which specializes in Drupal. Pantheon is another company who specialize in Drupal. Both of these offer a free sandbox hosting for Drupal.
Both services offer a one-click install of Drupal. If you choose to use either, you can skip directly now to the section entitled Installing Drupal 8.
Download the Dev Desktop 2 from https://www.acquia.com/downloads and install it selecting the defaults for the various settings.
Once you completed installing it, you will be offered the opportunity to run it.
When you do, you will see the stack start up in the background, and in the foreground, you will see a welcome window offering some choices.
The first option is what we are after right now, so click on it:
If for any reason you cannot access the preceding pop-up choice window, you can always get back there by clicking on the + sign at the bottom left-hand corner with choices including New Drupal site… that you should select:
At the time of going to click on it, there are several choices available to you, some notable ones being:
- Drupal: This is the official Drupal 7 core files. No extra flavoring added by Acquia, just the raw deal.
- Drupal 8: This is the official Drupal 8 core files. These official releases come bundled with a variety of modules and themes to give you a good starting point to help build your site.
Also included are a number of other distributions—various ready-to-go packages built around Drupal 7, most notably the following:
- Drupal Commons: This lets you create content-rich community websites built on Drupal 7. Easily add wikis, calendars, groups, and other social web capabilities.
- OpenAtrium: This is an ‘intranet in a box’ that has group spaces to allow different teams to have their own conversations and collaboration.
- OpenPublic: This is designed for open government requirements, such as improving citizen services, providing public access to data and a public forum for two-way communication with agencies, without compromising accessibility, security, or usability.
- OpenScholar: This helps educational institutions manage it by providing Drupal-based professor pages, class catalogs, sandboxes, and extra tools for administration. Learn more.
Locate the Drupal 8 offering and select install to begin the installation process:
Optionally, in the following dialog and in order to keep your installation precisely in line with the given screenshots, change the following:
- Local codebase folder.
- Local site name to Drupal 8 as shown in the following:
Now, select Finish. Since you are setting up Drupal from scratch and have no pre-existing database, all the remaining default options will be fine, and a database named drupal_8 will be created automatically. Apache will be appropriately configured, as will your local host file.
Dev Desktop sets up Apache on port 8083 rather than the standard (default) port of 80 so that it can be run on a local system without administrator privileges and without interfering with other local services. This means that when talking to sites governed by the Dev Desktop, you should always suffix your URLs with :8083.
Now that you have your server environment configured, whether it be a cloud sandbox, your own web server, or the Dev Desktop, the steps to install Drupal 8 are the same, only the URL will be different. In the case of the Dev Desktop, go to http://drupal-8.dd:8083/install.php in your web browser.
Note that the Dev Desktop tacks on the dd to the domain.
You will see a number of option screens during the install process each of which we will walk through now.
Select the language you want to install and click on Save and continue. This is the language the user interface will be presented in:
Next, select the installation profile you require. An installation profile sets up a number of defaults in your Drupal site, including which modules are initially active.
We recommend that you use the Standard installation profile until you understand what each of the modules does:
Next, you will need your database login details.
If you are using the Acquia Dev Desktop to develop your site locally, then you can just leave the defaults as follows because it creates the database and user itself (you do not need to, and should not, set a database password). Please note that on any hosted environment you would of course always add a secure password.
If you are using your own web server or an alternative local AMP stack, you will need to complete the appropriate database credentials for a database that you have already set up in advance:
Select Save and continue. Next, you will see a progress screen entitled Installing Drupal, which details the progress of installing each of the standard core modules that are active in a base install:
This may take a few minutes, depending on the speed of your local machine.
Configuring your Drupal 8 site
Once all the modules have been installed and the progress reaches 100%, you will be presented with the Configure site dialog as shown here:
This step contains quite a few fields, so the different sections have been broken up into individual screenshots.
The value you enter in the Site name field will be used in the header of the site (depending on your theme settings) and also in the browser title bar.
Note that we changed the site name down from My site to simply Drupal 8 purely for neatness:
The e-mail address entered is the main contact address of the site and will be used as the from address by default whenever an e-mail is sent out by the site. The site maintenance account that is automatically created, now is the master account for the Drupal site—often referred to as the admin, user, user 1, or uid:1. This account has special privileges. It has high powered permissions, in which it is not subjected to any kind of permission-based controls.
Due to the extremely high powered nature of this user, it is especially important in any real site to use a strong password rather then something like admin, as we are using in this tutorial.
The e-mail address will be copied from the site e-mail address by default, but it does not have to be the same.
For security in a real-life Drupal site, it is strongly recommended you use a non-standard username for the site maintenance account (and not something common or easily guessable).
However, for the sake of simplicity, we will just use admin for the username and admin for the password.
Next, you can set the default country and time zone for your site. The values chosen here will affect the various other regional settings in the site—for example, date formats:
The final installation step asks if you would like to check for updates automatically. It is highly recommended that you leave this switched on as you will then be notified when there are new versions of Drupal core or any contributed modules you have added.
If you do not select Receive email notifications, you will be notified of available updates via a notice on screen when you are logged onto the site with the site maintenance account active (as indeed you are now):
Select Save and continue.
Your installation of Drupal 8 is now complete, and you will see a message that says Congratulations, you installed Drupal!.
You will also see the “Toolbar” module providing access to: Manage, Shortcuts, and your (admin) account page, and beneath that, the “Tray” as shown in the following screenshot:
Congratulations, your Drupal site is installed and ready to go!
Troubleshooting your installation
If your site does not install correctly, there are some configuration tips that you might want to check.
Note that if you are using the recommended Dev Desktop, you need not do any of this.
Sometimes, Memory settings may need to be adjusted to get your site running correctly. Here are some suggestions on things to adjust.
If you are getting out of memory errors during installation, you can try increasing the memory available to Drupal.
When you imported the Drupal 8 site, the Dev Desktop will have created a site folder, which contains a settings file specifically. The site-specific settings file is called settings.php and can be found in the default folder.
Note that the default folder is also linked to the drupal-8.dd symlink.
Locate and edit the file:
Add a new line:
This increases the memory allocated to PHP when running your site. 128M should be sufficient, but if you still have problems, try increasing this. Note that by default, the file should have been set to read only on your system and therefore you may need to take some action before you can save your changes.
I would change this to something like “If you have a slower computer, sometimes the PHP timeout settings needs to be increased to allow more time for the installation steps to be completed.”
In the same settings file, as before:
Add a new line:
The 240 here refers to the number of seconds and this should be sufficient, but if you still have problems, try increasing this again.
Congratulations, you know have a Drupal 8 full clean install using a standard profile. By following the steps in this article, you should now have a full clean install of the Drupal 8 standard profile. Next, we will look at fundamental Drupal concepts and the terminologies you will come across while learning to build your first Drupal 8 site.
Resources for Article:
- Drupal 8 Configuration Management [Article]
- Installing and Configuring Drupal [Article]
- Drupal 7 Social Networking: Managing Users and Profiles [Article]