In this post we are going to see the steps that are involved in installing Drupal either on you local machine or on a actual webserver.
Pre-requsites:
Drupal is primarily based on PHP and works with MySQL or MariaDB. So we will need these software ready on our system before hand
As of writing this post latest version of Drupal release is 9.2.10. You can download it from here (Download Drupal). Note: By the time you go the website the version might have been updated. If you are looking for a different version for some specific reasons, see the specific version series page.
Software Requirements and Version:
- PHP PHP 7.3. PHP 7.4 is also supported but not required. PHP 8 is supported from Drupal 9.1.0
- MySQL version 5.7.8+ OR MariaDB version 10.3.7+ or greater. (Other databases are supported, click here for details)
- Apache WebServer 2.4.7+ (To be on safer side).
- phpMyAdmin (optional, required if you do not know how to use the command line mysql utility)
This post assumes that the above softwares are already installed and configured.
Pre install steps:
-
Drupal works with one database that needs to be created before hand. You can use either phpMyAdmin or the mysql command line interface to create a new user and a single database assigned to the same
-
Never user 'root' and nopassword setup. Make sure your mysql/mariadb root password is set to somthing strong.
-
To create a new user and assign a database via mysql command line, connect to mysql/mariadb using the following command:
-
mysql -u root -h localhost -p
-
You will be prompted for the 'root' password, enter the same:
-
On the mysql command prompt run the following query:
-
Create a database:
-
mysql> CREATE DATABASE mydrupaldb;
-
Create a user with password:
-
mysql> CREATE USER 'mydrupaluser'@'localhost' IDENTIFIED BY 'm@ki14$EEf';
-
Grant database access to user created above:
-
mysql> GRANT ALL ON mydrupaldb.* TO 'mydrupaluser'@'localhost';
-
Keep a note of all the three things above, Username, Password and Host (localhost)
-
Login with these credential and check if database is accesible.
-
mysql -u mydrupaluser -h localhost -p
-
Run query: SHOW DATABASES;
-
If you see the database just created we are good to go.
-
Download Drupal: most probably you have already downloaded it, if not download the compressed (tag.gz or zip) as per your requirement. (Download Drupal).
-
Locate Document Root: Depending what OS you are using you will need to know your document root, this is where we will be extracting the WordPress files.
-
In GNU/Linux running apache it could be:
-
/var/www/html
-
For XXAMP/WAMP under other OS please check there documentation [ TBA ]
-
Once done uncompress the downloaded file in the document root directory. (You may want to keep it in some sub folder, but in reality Drupal would be the main CMS running your site, so make sure to first move all the files to the actual Document Root and not in a sub folder.
Installation
-
Start installation: Open A browser and in address bar type:
-
http://localhost (if files are copied directly into Document Root)
-
http://localhost/drupal (or whatever is the sub directory name, if installed in a sub directory)
-
-
Select a language for installation.
-
Click Save and Continue
-
Select a Profile for installation:
-
Drupal by default provides 3 profiles for installation, profiles are pre-defined setups with certains modules of others
-
We will go with standard installation
-
-
Verify Requirement
-
-
The next steps checks for some read write permissions and a file settings.php which should be there in drupal-root/sites/default/
-
You will need to copy the file default.settings.php to settings.php
-
Also make sure that write permissions is available
-
If you come across any missing PHP libraries install them accordingly
-
Also there should be a directory drupal-root/sites/default/files which should be writable by server
-
Once done At the Bottome of page, there is a try again link, click that
-
Provide database and user information (The one which you created in previous steps)
-
- Advanced Options:
- If your Database port or host is different you can specify it here.
- Also you can provide a table prefix for you Drupal Database.
-
-
After you clck Save and Continue Installation will start
-
-
Next step will setup the Site Name and admin user (with password) country and timezone. In a live server make sure to give a proper email id, it is used for recovering password and getting update information.
-
-
Click "Save and Continue" to finalize your setup.
-
Installation Done.
-
-
You will be logged in into you website as the first user created
-
The first user is the Administrator for the site
Thats it, your Drupal in now installed. Enjoy.
Check out the following video for demo:
|
Add new comment