Drupal is a powerful, open-source Content Management System (CMS) used to build websites, ranging from simple blogs to complex, enterprise-level web applications. It is known for its flexibility, scalability, and robust community support. Drupal provides a vast library of free modules and themes, allowing you to tailor your site for any need—whether it’s an eCommerce store, a government portal, or a personal blog.
Why Use Drupal:
- Customizable: Thousands of modules and themes for extended functionality.
- Scalable: Suitable for small and large websites alike.
- Security-Focused: One of the most trusted platforms for handling sensitive data.
- Multilingual: Built-in support for multiple languages.
- Mobile-Responsive: Ensures websites are optimized for all devices.
Drupal is an excellent choice for businesses and individuals who need a versatile and secure CMS that can grow with their needs.
Creating an Instance on Cloud.shape.host
Step 1: Access the Dashboard and Create an Instance
Log in to Cloud.shape.host, click Create, and select Instances.
Step 2: Choose a Datacenter Location
Pick a location such as New York, London, or Frankfurt to reduce latency for your users.
Step 3: Select a Plan
Choose a plan depending on the resources you need (Standard, CPU-Optimized, or Memory-Optimized).
Step 4: Choose an Operating System
Select Ubuntu 24.04 as your OS for installing Drupal.
Step 5: Configure and Launch
Configure Network Type and Authentication Method (SSH key or password), then click Create Instance.
Locate Your Instance’s IP Address
Accessing Your Instance
- SSH (for Linux/macOS):
ssh root@<your-instance-ip>
Replace <your-instance-ip>
with your instance’s public IP.
- PuTTY (for Windows):
Download PuTTY, enter the instance’s public IP, and click Open.
Step-by-Step Installation of Drupal CMS
Step 1: Update and Upgrade the System
First, update and upgrade your system:
apt update -y
apt upgrade -y
Step 2: Install Apache, MariaDB, PHP, and Composer
Install the LAMP stack and other required PHP modules:
apt install apache2 mariadb-server composer php php-apcu php-dev libapache2-mod-php libcurl4-openssl-dev php-cli php-mysql php-zip php-gd php-fpm php-json php-common php-intl php-mbstring php-curl php-xml php-pear php-tidy php-uploadprogress php-soap php-bcmath php-xmlrpc
Step 3: Check Apache and MariaDB Status
Make sure both Apache and MariaDB services are running:
systemctl is-enabled apache2
systemctl status apache2
systemctl is-enabled mariadb
systemctl status mariadb
Step 4: Verify PHP Version and Composer Installation
Check PHP and Composer:
php -v
sudo -u www-data composer -v
Step 5: Configure PHP Settings
Edit the php.ini
file to optimize the PHP settings for Drupal:
nano /etc/php/8.3/apache2/php.ini
Change the following settings:
memory_limit = 512M
upload_max_filesize = 60M
max_execution_time = 300
date.timezone = Europe/Amsterdam
Save and Exit:
- Press
CTRL + O
to save, thenEnter
. - Press
CTRL + X
to exit Nano.
Step 6: Restart Apache
Restart Apache to apply the new PHP settings:
systemctl restart apache2
Step 7: Secure MariaDB and Create Drupal Database
Run the MariaDB secure installation:
mariadb-secure-installation
Log into MariaDB and create a new database and user for Drupal:
mariadb -u root -p
Run the following SQL queries:
CREATE DATABASE drupaldb;
CREATE USER 'drupal'@'localhost' IDENTIFIED BY 'DrupalSecurePassword';
GRANT ALL PRIVILEGES ON drupaldb.* TO 'drupal'@'localhost';
FLUSH PRIVILEGES;
SHOW GRANTS FOR 'drupal'@'localhost';
Step 8: Download and Install Drupal
Navigate to the /var/www/
directory:
cd /var/www/
Download the latest version of Drupal:
wget https://www.drupal.org/download-latest/tar.gz -O drupal.tar.gz
tar -xvf drupal.tar.gz
mv drupal-* /var/www/drupal
Set the proper ownership and permissions for the Drupal directory:
chown -R www-data:www-data /var/www/drupal/
chmod -R 755 /var/www/drupal/
Step 9: Enable Apache Modules
Enable SSL and URL rewrite modules for Apache:
a2enmod ssl rewrite
Step 10: Configure Apache for Drupal
Create a new virtual host configuration file for Drupal:
nano /etc/apache2/sites-available/drupal.conf
Insert the following configuration:
<VirtualHost *:80>
ServerName example.com
ServerAdmin contact@example.com
DocumentRoot /var/www/drupal
# Add security
php_flag register_globals off
ErrorLog ${APACHE_LOG_DIR}/example.com.error.log
CustomLog ${APACHE_LOG_DIR}/example.com.access.log combined
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /var/www/drupal>
Options FollowSymlinks
#Allow .htaccess
AllowOverride All
Require all granted
<IfModule security2_module>
SecRuleEngine Off
# or disable only problematic rules
</IfModule>
</Directory>
<Directory /var/www/drupal/>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>
</VirtualHost>
Save and Exit:
- Press
CTRL + O
to save, thenEnter
. - Press
CTRL + X
to exit Nano.
Step 11: Enable the Drupal Site and Restart Apache
Enable the site and restart Apache:
a2ensite drupal.conf
apachectl configtest
systemctl restart apache2
Step 12: Secure Drupal with Let’s Encrypt SSL
Install Certbot and obtain a free SSL certificate from Let’s Encrypt:
apt install certbot python3-certbot-apache
certbot --apache --agree-tos --redirect --hsts --staple-ocsp --email contact@example.com -d example.com
Accessing Drupal
Once the installation is complete, visit your Drupal site by navigating to:
http://example.com
Follow the on-screen instructions to complete the Drupal setup process, which includes configuring your site and connecting to the database you created earlier.
Step 13: Choose Language
The Drupal installation begins with selecting your preferred language. This will define the language of the Drupal interface. Choose the desired language from the dropdown and click “Save and continue” to proceed.
Step 14: Choose Profile
In this step, you’ll select the installation profile. The “Standard” option installs commonly used features, while the “Minimal” option provides a bare-bones setup for advanced users. You can also explore the “Demo: Umami Food Magazine” profile to see a pre-configured sample site. After selecting your profile, click “Save and continue.”
Step 15: Set Up Database
You now need to configure the database connection. Enter the database name, database username, and password for your Drupal installation. Ensure that these settings match your server’s database configuration. Once completed, click “Save and continue” to begin connecting to the database.
Step 16: Installing Drupal
The system begins installing the necessary modules and components for Drupal. A progress bar indicates the installation’s status. This step might take a few minutes as the system completes the installation of essential modules. Once done, you will be prompted to configure your site.
Step 17: Configure Site Information and Admin Account
In this step, you’ll configure your site’s basic information and create an administrative account. Enter your site name, site email, and create a strong password for the admin account. You’ll also configure regional settings (like timezone) and update preferences. After completing this section, click “Save and continue.”
Step 18: Drupal Welcome Page
Once the configuration is complete, you will see the Drupal welcome page. This screen confirms that Drupal has been successfully installed. From here, you can begin exploring Drupal’s features, adding content, and customizing your site’s appearance and structure.
Step 19: Drupal Admin Dashboard Configuration
The Drupal admin configuration page provides a comprehensive dashboard to manage your site. You can configure key aspects such as people management, site settings, performance, content management, and regional preferences. This dashboard is the central hub for customizing and managing your Drupal site.
For enhanced performance, security, and reliability, consider using Shape.Host’s Linux SSD VPS services to host your Drupal CMS. Shape.Host provides scalable infrastructure for your Drupal site, ensuring a smooth user experience.