What is Drupal?
Drupal is an open source software application, a content management software (CMS) which can be used to build up websites having different functionalities e.g. Blogs, personal websites, shopping sites, Photo galleries, music, and video streaming sites and many more. It is built upon PHP language and uses MySQL as the database engine to store the website data. It is so easy to install and administer, and you actually don’t have to be a programmer to work on it. It is completely GUI based and highly customizable. Since it is open source and community driven, anyone can build and contribute new functionality to its code. Drupal has a steep learning curve, and people who use this software includes, Bloggers, Media persons, Librarians, and IT professionals. With the government’s advocacy to use free and open source software, many government agencies and Institutes are on the trajectory of using Drupal. If not the most popular CMS, Drupal surely is the most influential CMS available.
- Benefits of building with Drupal
Drupal offers a number of benefits not found with the other methods of building a web site. Many of these are related to the ease of maintenance and the ability to concentrate on business functionality rather than building common, repetitive functionality.
1. You are free to concentrate on building content and functionality to support your scope of work rather than creating basic functionality already provided by Drupal.
2. The look and feel of the site can be easily changed without rewriting the entire site or changing all of the pages.
3. All changes to the site take effect immediately, so you can ensure that the changes are correct.
4. Changes can be previewed prior to the web site being updated, to make sure that they work properly.
5. Revisions to pages can be tracked, and you can require pages to go through an approval process prior to being made viewable.
6. You do not have to use FTP or other methods to deploy pages to your site.
7. Development costs are low as Drupal is available free of charge.
8. There is an active community that can help to answer any questions that you may have.
9. Drupal is actively maintained and enhanced by a very active community of developers, which helps to ensure that potential security issues are rapidly found and fixed. Drupal support is available through a well-maintained documentations, discussion boards, mailing lists, and IRC.
10. Drupal can be used effectively by a wide range of people, even if they do not have any programming experience.
11. Site management can be delegated to a group or team of people who can share responsibility for the entire site between them, or take individual responsibility for specific areas within the site.
12. As Drupal is constantly being maintained and updated, you can gain access to new technologies more rapidly than would otherwise be possible.
- Disadvantages of Drupal
Although Drupal is a very powerful tool, its very power causes a few disadvantages:
1. A short learning curve is needed to get started and use the system effectively.
2. It is more hardware-intensive than basic static pages.
3. Additional programming may be needed to customize Drupal modules to do exactly what you want. Alternatively, you may have to compromise on desired functionality, based on what is actually available.
4. Hackers may try to target Drupal sites as there are a large number of sites that use Drupal.
5. There may be limitations to the framework, which could make building custom functionality more difficult.
Installation of Drupal
If you were to split Drupal into two major components, the first would be The Code and the second would be the Database. Where the code handles all the logical part for the site, the database handles all the storage of the content of the site. The latest code available for Drupal is Drupal 7.39, which is the stable release till the time of the making of this documentation, and I would recommend you to use the latest stable release of the code when you install it. There is extensive development going on Drupal 8 and making progress day by day, it is being shipped as a beta release, but I won’t recommend it for a production server
Ok, so let’s get going with the installation of Pre-requisite softwares for Drupal:
- PHP framework; This is a server-side scripting language, on which the core Drupal code is written, and it has to be present on the server in order to run the Drupal code.
- Apache HTTP Server; Also known as HTTPD server, is a software project of Apache Foundation, which works as a web server to publish the webpages and other contents from your server machine on the world wide web. This will hold the actual Drupal code, and make it available to the internet audience.
- MySQL; MySQL is a fast, multi-user and robust SQL database management software. MySQL will store the data or the contents of your Drupal website in different and inter-related tables.
- phpMyAdmin; phpMyAdmin is a tool actually written on PHP, and it helps the administration of MySQL database much easy by providing a web-based and secure graphic user interface of your database.
- Drupal; Lastly the Drupal source code itself, Navigate to http://drupal.org in your web browser. You can either download Drupal from the link available on the home page, or you can navigate to https://www.drupal.org/project/drupal and download it from there.
Apart from the code, other pre-requisites listed from 1 to 4 can be downloaded and installed separately on your windows server, but it is only recommended only if you are an advance user. However there is another effective alternate to that. It is called XAMPP. XAMPP is a PHP development environment, a bundle package of the above mentioned pre-requisite softwares i.e., PHP, MySQL, phpMyAdmin and also includes other packages like, Tomcat, Filezilla, sendmail and Perl. This software can be downloaded from https://www.apachefriends.org/download.html . So all you have to do is download the Drupal code and XAMPP package. And save it on your PC, like I have saved mine on Desktop.
Now first we will need to install XAMPP server, so that we have APACHE WEB SERVER, PHP, and MySQL installed with it, on our pc. Just Double click the installer file and it will start the installation wizard.
It is OK if you see any warning dialoge about UAC
Click ok and it will lead to the component selection screen. As I mentioned earlier, we only need, PHP, Apache, MySQL, and phpMyAdmin for building our Drupal site, so make sure these four are selected. But if you want to experiment more with XAMPP package you can install others as well, they won’t conflict with our Drupal installation (unless you tell them to do so).
Now we are installing it on the default location, which is “C:/xampp “and click next. But you can change it if you want to install it on some other drive or inside a folder.
You can uncheck the “Learn More about Bitnami for XAMPP” checkbox Check if you don’t want the installer to open the Bitnami webpage. And click next.
Click next on this window and XAMPP installation will start.
When it finishes the setup, the installer will ask you to start the control panel
You can also find the XAMPP Control Pannel in the start menu, after installation is finished.
XAMPP server will start and a notification will appear in the system notification area.
This screen will show you the GUI of all your XAMPP packages, which you chose to install, and from here you can start and stop the services, configure and edit the related .ini files, see logs and configure the behavior of XAMPP server.
When you start any of the service (like I have started Apache and MySQL) the name of the service will turn green, which means it is not in a working state. It also shows you the Program ID and the port number on which the service is running. When you have your windows firewall turned on and you run the service for the first time, Windows will prompt you whether you want these services to have access to the public and private network through the firewall. Just check mark on both of them and click on allow access.
If everything goes fine, your control panel screen will look like this.
If any service fails to load, it will not show any port number and will also show in the activity section below. If this happens, click on the logs button of particular service to check what went wrong.
So let’s check if the PHP and Apache Web server is working, you can click on Apache’s admin button on the control panel. Or open your favorite web browser and open http://localhost/dashboard/phpinfo.php and it will show you the full information about your PHP environment, Apache web server and all the PHP modules loaded.
To open the GUI interface of MySQL database through phpMyAdmin, click on the MySQL admin button on the XAMPP Control panel and you will land on the following page.
Here you have to create a database for the website here. Create a database of any name you would like and remember that, we will be giving configuring that database to be used while configuring Drupal installation. For example, I had created a database named “drupal”.
We have created a database but it can be accessed by the root user of the MySQL, which is not a good practice to follow on a production server. It is because when you install XAMPP, it installs MySQL database engine with only root user which has no password set for it. Because there is no password security for the database, anyone having access to the web server will be able to get into your site database and mess up with your crucial data. There are other security reasons as well, to not to use the root user for connecting to your Drupal site database.
So the best practice is to set a password for your root user, and also create a separate user for your newly created Drupal site database. Click on the privileges tab.
Click on add user.
Chose a username for you user, in the host value you can mention localhost, as we are running the database server and Drupal code on the same machine, and then chose a strong password. Scroll down the screen and click on “Go” button. For this documentation, I have chosen “drupal” as the username and same as the password.
This new user you have created will only have the read/write access for the Drupal database only. All other databases created on this server instance will remain intact from its actions. This practice helps to ensure security when you have hosted multiple databased on the same MySQL instance or running multiple websites on the same server.
Now after you have done with this database creation, you can now close this browser window.
And then next we will extract the source files of Drupal 7.39 which we had downloaded from the website. And we need to extract those downloaded files in htdocs directory of the XAMPP server. This Webroot directory is located in “C:\xampp\htdocs”. You can use any tool for unzipping these compressed source files.
Ok now, these files have been extracted into the web root directory of XAMPP lets go there and see. You can remove the existing XAMPP files in this folder and paste the Drupal source code contents directly in this folder, or you can paste the Drupal source code folder here and rename it as per your preference. I have copied the source code folder in the htdocs directory and have renamed it from Drupal – 7.39 to “drupal” only
After renaming the folder to Drupal. Let’s go back to the browser and open the following link there. http://localhsot/drupal. (you can change the name of the Drupal folder as per your preference, but then you have to put the same name in the URL also, after localhost/)
The following screen will appear on the browser, which is called the Drupal web installer. On the first screen, it will prompt you about the Drupal profile which you want to install. On most of the cases, we chose Standard, and click on save and continue.
Next screen will prompt you the option of the language in which you want to install Drupal. Since US_English is built in, it is checked by default, but you can download other language profiles and translation files from Drupal site if you want to install Drupal in a language other than English.
Next screen will come, asking for database name, database username and password.
Give the name of the database which you have created earlier in phpMyAdmin. Like I’m giving here my database name “Drupal”. And provide the user name and password of the database. REMEMBER, if you have not given any username and password to your database, the default values will be used. The default username is “root”, and password is blank.
Fill in all these and click on save and continue, a progress bar will appear which indicates that your Drupal installation is going on.
This installation may take some time, as it compiles the code, execute the PHP instructions and create different database tables. So sit back and relax which complete all this crazy work for you.
The next screen will also ask for the site name, site email address, the username of the superuser (Administrator), and email address of the superuser. Provide these and scroll down.
There are some more things to set up, fill in the password for the Root user. Select the timezone according to your area, next is Update notification, you can also ignore this if you don’t want Drupal to search for its updates. Click on Save and continue……
Drupal installation is complete now. Visit your new site.
Ta-Da………… YOU ARE IN…..
Ready to administrate your drupal site.
On the topmost section of the website, you will find an Admin toolbar, from where you can perform various administrative tasks to control your website, install new modules, create new contents and webpages.
To create new basic page, news article or blog post go to contets tab and click on add content link as shown in the screen below.
Drupal provides very basic functionality out of the box, it can act as a blogging site, a news site, a personal website with various web pages and a wiki site. This is because these basic modules comes to prebuild in the barebone installation of Drupal. But if you want to add some extra functionality to your Drupal site, or customize it in your own way. You can install job specific module to enhance your site ability. The modules can be controlled from the modules tab in the Admin toolbar.
The Configuration of global site parameters and module specific parameters can be accessed from the configuration tab in the Admin Toolbar. Since this documentation is intended to provide information on the introduction and installation part of the Drupal software, Module installation and configuration part is not fully covered here.
As I mentioned earlier, Drupal is actively maintained and enhanced, which helps to ensure that potential security issues are rapidly found and fixed, there is an active community on IRC and discussion forums that can help to answer any questions that you may have.
So, Play around. Administrate your Drupal site, and explore as much as you can.