Drupal on a basic server stack

Welcome back! In the last post we covered installing Drupal on Acquia, a SaaS company. It took roughly an hour for the installation to occur, but to be fair, the free options are probably far slower than their paid options. Probably.

This post, we’ll go over installing Drupal locally on our own web stack. I’ll be using MAMP, which contains Apache (a web server), MySQL (a database), and PHP (because Drupal does run on PHP), but feel free to utilise whatever infrastructure you need, so long as it meets the requirements.

First off, let’s grab the Drupal package. As of this post Drupal is 8.2.6, but feel free to use any later version if you see it.

Download page for Drupal. The latest version is highlighted.
Given we installed Drupal 8 on Acquia, it makes sense to use the same version locally.
Hovering over a link to download a zip copy of Drupal 8.2.6.
The zip file is easier to extract, but the tar.gz file is smaller in size. Extracted, it’s the same size, so don’t fret… unless you have a tight data cap.

After waiting a while, the full archive should be downloaded! Just extract it, and you get something like this:

A directory containing the files necessary for Drupal installation and operation
You get a bunch of files. Some of them, like the licence and the readme aren’t necessary. Arrow CC-BY-SA 2.5

Then move the folder contents to our web directory (a folder typically called htdocs or www). Ours in this case is in /Applications/MAMP/htdocs/drupal, which means the address to access it is http://localhost/drupal (it is case sensitive, so watch out!).

Let’s move on and create the database for it so we have somewhere to put it.

phpMyAdmin: A saviour to the uninitiated

Our MAMP stack contains everything I mentioned at the beginning, but it also contains an application called phpMyAdmin. It’s useful as a means of viewing and editing MySQL databases.

Signing in as root (the default superuser in MySQL), let’s create another user to manage our database, just so we don’t inadvertently ruin any others:

003-userfill-fs8
Our example user has a weak password, but that’s for convenience. Use a good password in production!

After this, let’s create the database itself, then grant privileges to our newly created user so we can work with it:

This slideshow requires JavaScript.

With privileges sorted and Drupal uploaded to our server, let’s install Drupal!

Moment of Truth

Now, let’s go to where our Drupal folder is in our web browser by pointing it at our web server, and… oh:

The Drupal Installation Splash Screen.
Yup, it’s this screen again.

The process of installation is pretty much the same as it was in the last post. But keep going:

screen-shot-2017-02-13-at-6-56-42-pm-fs8
This looks scary if you know nothing about any of these.

…and you get to the requirements page. Since we’re not running off Acquia (which they guarantee will work with Drupal), we need to make sure that everything is good to go. In this case, PHP OPcode caching not being available isn’t a deal-breaker, so we can continue.

screen-shot-2017-02-13-at-6-59-25-pm-fs8
You know the details of the database server? Enter them here.

After we enter our database credentials, the installation process kicks off proper now it knows everything it needs to know:

Now we're moving along.
It knows. It knows.

Then we configure our Drupal site as we did before, and our site is ready to go!

screen-shot-2017-02-13-at-7-03-23-pm-fs8

The end.