On this site, we’ve gone over WordPress in great detail. Despite the fact that WordPress is the most popular and actively developed CMS, it is not the only good one on the market. In this article, we will go through Drupal in depth, determining who it may be used for and how to install Drupal on litespeed web server.
If you’re asking why we should use a CMS other than WordPress in 2022, consider this: Drupal powers 14% of the top 10,000 websites in the world. It is the second most popular content management system (CMS) after WordPress. Drupal is frequently used by political officials, governments, and celebrities. Grammy’s website is hosted on Drupal.
So it is more than just another content management system; it’s a CMS for mission-critical websites.
In this article, I’ll walk you through practically every key aspect of Drupal, including but limited to how to install Drupal on litespeed web server and how to administer various types of websites using Drupal.
Before we continue, we’d like to tell you about Contabo. We recently switched LinuxAndUbuntu on Contabo. Check them out if you need web hosting. Prices start at $6.99 per month for an 8GB RAM and 4 Core CPU VPS.
Drupal Vs. WordPress
This post is not intended to persuade you to move from WordPress to Drupal. I’ll lay out the facts about both CMS and let you pick which one is best for your ideal website.
In this section, I will evaluate the two CMSs based on three key criteria: usability, scalability, and security.
Usability or Ease of Use
One of the most crucial things that contributed to the success of WordPress is its ease of use. When it comes to ease of use, no CMS comes close to WordPress. Drupal, on the other hand, has been difficult for new users. For new users, there is a steep learning curve, but the community is helpful along the way.
Since Drupal 8, the platform for producing content has undoubtedly become a little easier. It still has a long way to go. Here’s a side-by-side comparison of Drupal and WordPress editors.
Drupal uses CKEditor, which is similar to WordPress’s classic WYSIWYG (What You See Is What You Get) editor. WordPress has successfully transitioned to Gutenberg, a more robust block editor.
Every website begins small and gets bigger by the time. WordPress is widely used by the world’s leading brands. Their websites receive millions of views every day, and their information is served flawlessly. WordPress is used by Microsoft News, Sony Music, BBC America, and The Walt Disney Company, to name a few.
WordPress is built to evolve with the needs of the website. The future WordPress 6.0 release will include a change designed specifically for large sites, i.e. sites with more than 10,000 users. Large websites running WordPress 6.0 will serve content more quickly.
Despite the fact that WordPress is meant to host massive websites, it requires continuous optimization. Installing the incorrect theme or loading the site with a slew of inefficient plugins may cause the site to crawl.
Drupal, on the other hand, which was built using the same technology as WordPress, is equally optimised and well intended for large sites, particularly Drupal 8 and subsequent versions. It requires constant optimization, just like WordPress, and sites should not be overloaded with unneeded modules or poorly designed themes. If properly optimised, Drupal 8 and later versions can scale to millions of users.
Aside from the well-planned design of both frameworks, it is strongly advised to use extra technologies to reduce server load. Users can cache content to reduce database server load and increasing server response time.
When you have visitors from all over the world, CDNs are essential. The Content Delivery Network retrieves content from the server and distributes it to other servers located on all continents. When a website uses CDN, its users are served data from the closest server, resulting in a considerably speedier process.
The right hardware is essential for a fast website. WordPress and Drupal are both written in PHP, which is known for consuming a large amount of system resources. Although PHP 7 and later versions have been considerably optimised to utilise fewer resources, extra plugins and themes still require processing power to process and serve content more quickly.
Whether a website is intended to serve a few hundred or a million users, security is a crucial component of the overall website operation. Both WordPress and Drupal are well-protected against all known vulnerabilities, such as XSS and SQL injections.
However, website themes, plugins, or modules must be properly selected. Less experienced developers frequently fail to sanitise user input in their plugins, making the WordPress site unsafe.
Users can also use a firewall to prevent malicious requests from being hit & served. In an article, I’ve gone over the various types of website firewalls in detail. I really recommend that you read it.
Mistakes are unavoidable, regardless of the size of a developement company. WordPress, Drupal, theme creators, and plugin developers all provide updates on a regular basis. Configure your installation to install updates as soon as they are available. The auto update plugins/themes feature was introduced in WordPress 5.5. Drupal, too, checks for available core, module, and theme updates and installs if available.
In addition to automated updates, Drupal and WordPress both provide a detailed summary of the server installation. Here’s a screenshot of how the Drupal status report looks.
WordPress provides a complete health report with a wealth of data. Aside from the current server setup, the health report recommends installing essential PHP modules (if not already installed), detecting and displaying issues linked to the server’s network connection, and so on.
Drupal status report is also built into the CMS and gives extra security information such as filesystem permissions, detecting and displaying security errors, and other information that WordPress does not display without additional plugin(s).
At the time of writing this article, Drupal 9.3.x is the latest version. Drupal was published in June 2020, along with Drupal 8.9.0. (which has reached end of life) and it will continue to be supported until November 2023.
Drupal 9 introduced significant core updates, including the removal of deprecated code, updating dependencies to the most recent versions, and improved PHP and database support.
Drupal has seen several significant changes during the course of its existence. The most significant update in its history occurred with Drupal 8. It was rewritten with Symfony, a popular PHP framework. As a result of switching to Symfony, it could also switch to a new templates engine called Twig.
Drupal currently has over 3000 themes in its theme repository. 769 of the 3000+ have a supported stable release.
Admin dashboard themes
To be honest, the default front-end and admin panel do not look particularly attractive. The platform appears more difficult and archaic with the current admin panel.
Here is how the Drupal admin panel looks like –
Everything is controlled by a navigation menu. There is not a centralised approach to see what is going on on the site. WordPress’s dashboard displays a lot more information and is quite dynamic.
However, the Drupal community has created several fantastic themes that will make administration much attractive easier to use. Gin Admin Theme is one of my favourite Drupal admin themes.
When it comes to themes, there is a directory with over 3,014 themes. What I dislike the most about the Drupal themes directory is that there is no option to filter themes based on the website niche. As a result, finding more accurate themes is a little more challenging. We can use other premium themes available on themes markets all over the Internet.
Here’s a comparison of the default admin theme versus a community-built theme.
Create article page
The default theme, Bartik, is very basic. It is sufficient to launch a basic website on the internet, but nothing more. To improve the look and feel of the website, community themes can be chosen.
How to install Drupal theme?
Users can use composer to install and update Drupal themes. For example, to install the Gin admin theme, run the following command from the root directory.
composer require 'drupal/gin:^3.0 Or composer require drupal/gin_toolbar:^[email protected] drupal/gin:^[email protected]
Once done, navigate to Appearance, install and set the theme as default.
Core includes a number of modules. Some modules are pre-activated, while others are not. All that is required is enable a module in order for its functionalities to be activated.
Drupal also has over 48000 additional modules that can be used to increase the functionality of a site. Yes, there are 48000+ external modules. To install a module, simply find it from the modules directory and follow the instructions in its documentation. The majority of plugins require users to use composer to fetch the package.
After installing extra modules, only the site administrator will have access. It is necessary to configure correct permissions for the module to be accessible for all website users.
Drupal for eCommerce websites
Drupal can be used to create simple to complex eCommerce stores. We can use the drupal/commerce package to import all of the necessary packages for running an eCommerce store.
It enables users to design product categories with custom attributes, dynamic product pages with variants, numerous order types and corresponding checkout processes, promotions with conditions and coupons, payment API integration with 100+ payment gateways, order management, and tax or VAT computation.
If you are starting from scratch, you can use drupalcommerce/project-base to create an eCommerce project. Alternatively, if you wish to construct a store on an existing site, simply install the drupal/commerce package.
composer create-project drupalcommerce/project-base mystore --stability dev
For existing sites –
composer require "drupal/commerce"
Drupal for bloggers
Drupal has all the basics to create a blog. We can build a blog on an existing site or create a whole new blog site. It enables you to write articles with CKEditor, a popular online text editor.
Personally, I believe that the default installation is insufficient for creating a modern, SEO-optimized, and visually appealing blog. To expand the framework’s functionality, more plugins must be installed. Installing an SEO plugin, such as SEO Checklist, is one example.
It requires users to manually set the URL for each article by default. A plugin like Pathauto is really useful because it generates URLs depending on the admin-defined pattern.
I recommend that users install the following key modules for bloggers –
- Simple XML sitemap
- Real-time SEO for Drupal (SEO Checklist alternative)
- Excellent module to build forms to accept data from visitors
Drupal Managed Web Hosting
A managed web hosting service is essentially a shared hosting service that sets up everything automatically for Drupal. Most managed web hosting companies host Drupal on the litespeed or nginx web servers, which are regarded exceptionally light on server resources and thus faster than the popular Apache web server.
Because I am not a fan of shared hosting, the majority of the managed hosting services I find are built on a shared server. You can learn more about shared hosting vs. dedicated hosting.
I suggest that you set up your own web server. If you go with Contabo, you won’t have to spend much money. They provide VPS and dedicated servers at a low cost.
With your own VPS or dedicated server, you can use any web server, including litespeed, nginx, apache, and others.
Install Drupal 9 on Litespeed Web Server
- PHP and PHP extensions
- Web server
- Database server
Install PHP and required PHP extensions.
sudo apt update; sudo apt upgrade -y
sudo apt install php-cli php-xml php-gd
Install MySQL Database Server
sudo apt install mariadb-server
We need to create a new database for our site and a new mysql user to managed database.
Run the following command to set up mysql installation –
sudo mysql (enter sudo password) or mysql -u root -p (enter mysql root user password)
create database drupal;
create user 'username'@'localhost' identified by 'password';
grant all privileges on drupal.* to 'username'@'localhost';
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
sudo php composer-setup.php --install-dir=/bin --filename=composer
sudo bash enable_lst_debian_repo.sh
sudo apt install openlitespeed lsphp81 lsphp81-mysql lsphp81-curl
Enable OpenSSL extension
sudo nano /usr/local/lsws/lsphp81/etc/php/8.1/litespeed/php.ini
Press Ctrl + W and search for openssl. It should move you to the line “#extension=openssl“. Remove the # to enable the extension.
Set up OpenLiteSpeed admin Password
sudo bash /usr/local/lsws/admin/misc/admpass.sh
systemctl restart lsws systemctl status lsws
Now open litespeed WebAdmin console at server-ip:7080. Enter the username and password created in the last step.
Click Virtual Hosts and edit the default Example virtual host. Change Virtual Host Name, Virtual Host Root, and Config File fields.
Click Save. Now go to General tab and edit General settings. Type Document Root as “Drupal/html/web”, enter your domain name, and alias domain.
Now go to Listerners and edit the default listener to open port 80. If you are going to use https, then add another listener add open port 443.
Save the changes. Now we are almost done setting up our web server. The only thing left is to create the Web root directory we set in the virtual host.
sudo mkdir /usr/local/lsws/Drupal
And that’s it. We can now download drupal files inside this directory using composer.
cd /usr/local/lsws/Drupal composer create-project drupal/recommended-project html
Set correct file permissions
sudo chown -R nobody:nogroup /usr/local/lsws/Drupal/html/web
And we’re almost done setting Drupal from the console. It is now time to launch a web browser and run the setup to complete the installation. I’m assuming you’ve already configured DNS to point your domain name to the server’s IP address. If so, enter the domain name into your browser, and the following page should appear. –
Next, select the installation profile. Keep Standard selected and click ‘Save and Continue’.
The installer checks to see if all of the prerequisites have been completed and lists them all on the next page. Read all of the errors carefully and correct them. If you require assistance, click on the links in the error messages. If you require further assistance, please post a comment below and join our Discord server.
After you’ve met all of the prerequisites, the next step will ask for the database name, database user, and database password you created before. Enter all of your information correctly, then click ‘Save and Continue.’
If the database credentials were correct, the Configure site page should have appeared. In this page, you can input site information such as the admin username and password. Please input your information carefully and remember to save it safely. We will need this username and password to login to our drupal admin panel.
And finally you have successfully installed Drupal on litespeed web server.
This was the introductory Drupal tour. It is one of the most stable open source platforms available and used to host websites for hundreds of organisations, governments, and celebrities.
If you find site administration too difficult with the extremely basic interface, I recommend installing community themes and modules. Before installing any module or theme, carefully select modules and read reviews.