How to Install Drupal 8?
Great work, guys! Now that you have read some things about Drupal and want to give it a try yourself, here is a step by step guide to Install Drupal 8 and help you get started. As they say, starting is the toughest part.
A brief about Drupal
Drupal is a content management framework. Now you ask what’s that? So, a content management system manages the creation and modification of digital content. Drupal mainly focuses on web-based content such as website structuring and stuff. It is developed on top of the programming language PHP. It is open-source, meaning that installing and running Drupal is free.
So, let’s begin the installation.
Prerequisites to install Drupal 8
Following are the prerequisites to install drupal8:
Before proceeding further, take out a moment to evaluate if your system has the necessary hardware and software for Drupal to function glitch-free.
- Operating System – Windows 7+/Linux/Unix/MacOS/Ubuntu
- Disk Space – The core software requires 100 MB of free disk space. AMP stack requires slightly more than 1 GB. It is recommended to have at least 1 GB additional free space to accommodate your website resources.
- Memory – At least 100MB of free RAM available.
Now that we have established that your computer is fit to install Drupal 8, there are some other sets of requirements to begin developing your website in Drupal. This is popularly known as the AMP stack (Apache MySQL PHP).
If your sole purpose is learning Drupal, you can simply download the above three software and install Drupal 8. The detailed instructions are provided in the next section (Installing AMP) of this document.
However, for a deeper understanding of various compatible software, read below.
- Internet Explorer 11+
- Firefox 5+
- Microsoft Edge
- Google Chrome
- Opera 12+
- Safari 5+
Database Server Requirements
Drupal websites support connectivity with loads of data servers out there. You can host your data either on a local engine or a remote engine using any of the below-recommended database service providers.
- MySQL 5.5.3+ (highly recommended)
- MariaDB 5.5.2+
- Percona Server 5.5.8+
- PostgreSQL 9.1.2+
- SQLite 3.6.8+
Although Drupal also supports MS SQL Server and MongoDB, it is highly recommended to use MySQL. This is because Drupal itself operated on the MySQL database server, and thus configuration becomes easy. Any other server requires additional database configuration. So, if you are a beginner at Drupal, it is advised to get a hold of Drupal on MySQL before experimenting with other databases.
Drupal 8 needs a web server to host the website that you would create. The web server must be hosted on Unix/Linux/OS X/Windows. You can set up a server on your own computer or on some web hosting site. A quick google search would enlist hundreds of web hosting sites. The recommended Web Servers are:
- Apache 2+ (highly recommended)
- Nginx 0.7+
- Microsoft IIS 5+
- PHP built-in web server (recommended for development only)
Apache is highly recommended as a vast community of Drupal users have done development and deployment on Drupal+Apache combination. This resolves common errors very easy.
PHP built-in web server is included with the CLI when you install PHP. This is the most convenient method if you are just beginning to learn website development, and hosting seems a daunting task to you. Do not use PHP web server for production environments, though.
Drupal runs on PHP. It is required for your computer to have installed PHP before you install Drupal 8. Drupal recommends PHP 7.2+ version.
Dependency manager requirements
Since Drupal depends on a web and data stack for smooth functioning, it is essential to manage its dependencies. Any non-compatible software/tool downloaded can bring down the entire website. Drupal recommends using Composer to manage the dependencies.
Steps to Install AMP
For beginners, who aim to learn Drupal with minimum hassles of hosting, server and other stuff, this section provides details on how to set up your local machine as the server and get started with Drupal development.
Step 1: Download the AMP installer executable file.
Step 2: Open the exe file. You will land on the following screen. You can select additional options if you want to. Click Next.
Step 3: Read and accept the license agreement. Click Next.
Step 4: Select the desired directory to install and click Next.
Step 5: You arrive on the start menu and desktop shortcut preference screens. Let them be the default, and keep clicking Next until you arrive at the Install button. Click Install to begin the installation.
Make sure you have an active internet connection throughout the installation process.
Step 6: Click Finish to complete the setup. Now your local computer has Apache MySQL PHP installed.
Steps to Install Drupal 8
Great, we have all the ingredients required and are all set to install Drupal 8. Let’s discuss several ways through which we can install Drupal 8.
For Beginners, it is recommended to download through the installation file as it is the easiest way. You can just skip to the relevant sub-point below. However, if you wish to expand your knowledge base, read on below.
1. One-Click installer from hosting provider
If you have opted to host your web server online through a web hosting provider site, look for a one-click Drupal installer. Get in touch with your hosting provider and ask them for a guide or documentation on a one-click Drupal installer.
2. Pre-configured environment
There are pre-curated installation kits for various local development environments. You can simply find the best one suited for you here. However, it is unlikely that after having installed the AMP stack at the least, you would require this installation option.
It is the highly recommended installation method as it would install the most compatible version of Drupal-based on your underlying stack of PHP version, Web server, and Data server. Simply put, the composer will manage the dependencies efficiently.
To download the Drupal core software, open the Composer command line and browse to the desired installation directory. Then run the below command.
composer create-project drupal-composer/drupal-project:8.x-dev mydir --no-interaction
This will install the core files in a folder mydir in the desired location.
4. Download the installation file
Alternatively, you can also download an executable file from the Drupal website. This is the safest and hassle-free option for those who are at the beginner stage of learning Drupal.
We will be covering this option step by step below.
Step 1: Download the latest release zip or tar.gz file from Drupal.
Step 2: Browse to the directory where MAMP was installed and replace the contents of the htdocs folder with the downloaded file’s contents.
Step 3: Open MAMP and click on ‘Open WebStart page’. Make sure Apache and MySQL servers are running.
Step 4: You will land on the following page.
Step 5: Set up a database. Click on phpMyAdmin.
Step 6: This will open the PHP Admin page in a new tab. Click on New in the left panel and enter DB name. Click on create.
Step 7: Go back to the MAMP tab and click on ‘MyWebsite’.
Step 8: You will be taken to the Drupal default website installation page.
Step 9: Click Save and Continue and select Standard Installation on the next screen. Click Save and Continue again.
Step 10: If you arrive at such a screen, click ‘Continue Anyway’ link at the page’s bottom.
Step 11: Enter the database name, username, and password. The username and password can be found on the MAMP landing page under the MySQL section. Click Save and Continue.
Step 12: Next, enter your website name, select a username and password and click Install.
Voila! Your first demo website is ready. Play around with it, give some little tweaks and learn Drupal in a fun way.
If you are running a 32-bit machine, you won’t be able to enter dates before the year 1901 and after the year 2038. This is commonly known as the 2038 problem.
This has been a guide on Install Drupal 8. Here we have discussed the Steps to install Drupal 8 and also the installation process of AMP. You may also look at the following articles to learn more –