Drupal Installation on localhost with XAMPP

Drupal Installation on localhost with XAMPP

Drupal installation is quite easy. It has some simple steps, which are shown below. First, we will learn about the software requirements to install Drupal for website development,

What you need for Drupal Installation

Installation of Drupal is quite easy. Here, we will learn the installation on localhost. For installation, we need XAMPP, which is an open source cross-platform web server solution stack package. Developed by Apache Friends, it provides you with a server i.e. Apache, database i.e. MariaDB (formally MySQL), and PHP.

For starting work on Drupal, you need the following software/ tools on localhost:

  • Drupal– Drupal is a free and open source content management system to develop dynamic websites.
  • XAMPP: It is a cross platform open source web solution package, that fulfills your need of,
    • Web Server
    • MySQL
    • PHP

Installing Drupal on Localhost using XAMPP

We’re learning Drupal installation from scratch, so first we need to install it on localhost. Here are the steps,,

Step1: Go to the official website of Drupal and download XAMPP

Download XAMPP for Drupal Installation

Step 2: After downloading, install it in any location. We will install it at the following location i.e. C drive,

Step3: Go to the following htdocs directory and create a new project folder.

Here, my project folder name is studyopedia. It will be located at the following location,

Step4: Time to install Drupal!

Go to the official website of Drupal and download Drupal’s current version. Here, you can see Drupal 8.3.4 is visible.

Download it on your system.

Download Drupal 8.3.4

Step5: After downloading, unzip the Drupal folder in the following location,

Unzip in a way the final project folder looks like the following,

Project folder after adding Drupal

Step6:  Now, go to START and type XAMPP Control Panel as in the following screenshot,

Open XAMPP Control Panel

XAMPP Control Panel started, now click start for Apache and MySQL

Starting Apache and MySQL on XAMPP

Step7: After following the above steps, go to the browser and type localhost. If the following UI opens, it means the XAMPP installation and everything is fine and we can proceed further,

localhost working correctly

Step 8: Time to create a new database in MySQL.

Go to localhost/phpmyadmin and click New to create a new database as shown below,

Creating new database ”DrupalDB”

Add the database name and click Create. We have added a name DrupalDB. After clicking Create, the following would be visible. It shows Database DrupalDB has been created,

New Database DrupalDB created

Step 9: Website creation Initiated! Now go to browser and type the project folder with localhost i.e.

Step 10: It will get redirected to the following link,

Drupal installation initiated

As shown above, choose language.

Step 11: Now, select installation profile as shown below,

Since, we are focusing on our first Drupal website, so select Standard,

Drupal Installation profile Standard selected

Step 12:  Now, you can see an error is visible under Verify Requirements section i.e.

 

PHP OPcode caching error

To resolve the error, follow the steps,

Step 12.1: Go to XAMPP Control Panel and click config under Apache as shown below. This
will open php.ini

Adding code to php config file

Step 12.2: Now, enable OPcode caching by adding the following code in php.ini,

Step 12.3: Now, save the above file and restart the server by clicking stop and then start on Apache.

Step 12.4: Now, reload the page where you saw error under Verify Requirements. If it redirect to the Set up database page, it means error is resolved.

Step 13: As we saw above, after resolving the error, it redirected to Set up database page. So, now, we will add the field values as shown below,

FieldValueDescription
Database nameDrupalDBName of database
Database usernameRootAs we are working on localhost
Database passwordKeep it as blank
HostLocalhostAs we are working on localhost
Port Number3306This is the port number for configuration. Keep what automatically comes.
Table name prefixwp_A prefix gets added to the table. You can leave it blank.

OPCache error resolved

After adding the above value, click Save and continue.

Step 14: Installation continues as you can see below,

Drupal getting installed

Now, Drupal installation is successful,

Drupal installed successfully
Step 15:
Now, you will reach the step to configure site. Here add basic details such as site name, site email address, default country, time zone, etc.

Adding Drupal site information

The following are the details added,

FieldValueDescription
Site nameStudyopediaAdd the site name
Site email address[email protected]Add email address
UsernameLearnerOneAdd username to login
PasswordAdd password login
Confirm PasswordConfirm the password added above
Email address[email protected]Admin email address
Default CountryUnited StatesAdd your country here
Default TimezoneAmerica/New YorkAdd the time zone here
Update NotificationsSet as per your choiceSet as per your choice

Now, you can see Drupal has been installed successfully.

Drupal installation complete

Introduction To Drupal
Drupal Website First Page
Studyopedia Editorial Staff
Studyopedia Editorial Staff
[email protected]

We work to create free tutorials for all.

No Comments

Post A Comment