Article

Table of Contents
Theme:
Was this article helpful?
Try Vultr Today with

$50 Free on Us!

Want to contribute?

You could earn up to $600 by adding new articles.

Install Backdrop CMS on Debian 11

Last Updated: Fri, Feb 25, 2022
CMS Debian

Introduction

Backdrop CMS is a free and open-source Content Management System (CMS) with a built-in upgrade from Drupal 7. This makes it more usable to Drupal users due to shared functionality. It's fast with great performance, has responsive user interfaces allowing for use on many devices, and provides add-ons that enhance functionality. Backdrop CMS is suitable for businesses and non-profits.

This article explains how to install Backdrop CMS on Debian 11.0 server.

Prerequisites

Perform the following steps first:

1. Install Required Packages

Update the system package list.

$ sudo apt update

Install MySQL server, Apache, PHP 7.4, and more modules.

$ sudo apt install apache2 mariadb-server php7.4 libapache2-mod-php7.4 php7.4-json php7.4-common php7.4-gmp php7.4-curl php7.4-mysql php7.4-zip php7.4-intl php7.4-json php7.4-sqlite3 php7.4-bcmath php7.4-mbstring php7.4-xmlrpc php7.4-gd php7.4-cli php7.4-xml php7.4-zip php7.4-imap wget unzip -y

Enable MySQL to start automatically on a reboot.

$ sudo systemctl enable mysql

Enable Apache server to start automatically on a reboot.

$ sudo systemctl enable apache2

2. Create Backdrop CMS Database

Run mysql_secure installation script, and set up MySQL security to prevent remote intrusion.

$ sudo mysql_secure_installation

When prompted, answer the questions as shown below:

  • Enter current password for root (enter for none): Press ENTER.
  • Switch to unix_socket authentication? Press N, then ENTER.
  • Change the root password? Press Y, then ENTER.
  • Remove anonymous users? Press Y, then ENTER.
  • Disallow root login remotely? Press Y, then ENTER.
  • Remove test database and access to it? Press Y, then ENTER.
  • Reload privilege tables now? Press Y, then ENTER.

Log in to MySQL shell. At the password prompt, enter your password to continue.

$ sudo mysql -u root -p

Create a database called backdrop.

CREATE DATABASE backdrop;

Create a database user called backdropuser with a password StrongPassword. Change the value StrongPassword with your own secure password.

CREATE USER 'backdropuser'@'localhost' IDENTIFIED BY 'StrongPassword';

Grant full access to the user on the database created.

GRANT ALL ON backdrop.* TO 'backdropuser'@'localhost' WITH GRANT OPTION;

Save the changes to take effect.

FLUSH PRIVILEGES;

Exit MySQL shell.

exit;

3. Install Backdrop CMS

Download the latest version of Backdrop CMS from the official GitHub page. Visit the release page to find the latest releases.

$ sudo wget https://github.com/backdrop/backdrop/releases/download/1.21.1/backdrop.zip

Extract the downloaded file to your current directory.

$ sudo unzip backdrop.zip

Move the extracted directory into the web root directory.

$ sudo mv backdrop /var/www/

Delete the downloaded files for security reasons.

$ sudo rm backdrop.zip

Set the ownership of the directory to the web root user and group.

$ sudo chown www-data:www-data -R /var/www/backdrop/

Change the access permissions.

$ sudo chmod -R 755 /var/www/backdrop/

4. Configure Apache2

Allow firewall through port 80.

$ sudo ufw allow 80/tcp

Disable Apache default configuration file.

$ sudo a2dissite 000-default.conf

Create Apache configuration file for Backdrop CMS named backdrop.conf.

$ sudo nano /etc/apache2/sites-available/backdrop.conf

Add the below code to the file. Save and close the file.

<VirtualHost *:80>

    ServerAdmin admin@example.com
    DocumentRoot /var/www/backdrop
    ServerName example.com
    ServerAlias www.example.com

    <Directory /var/www/backdrop/>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Enable the new Apache configuration file.

$ sudo a2ensite backdrop.conf

Enable Apache rewrite mode.

$ sudo a2enmod rewrite

Restart the Apache service.

$ sudo systemctl restart apache2

5. Access Backdrop CMS Web Interface

To access the Backdrop CMS Web Interface, go to your browser and visit http://Server_IP/. For example:

http://192.0.2.10/

Conclusion

You have installed Backdrop CMS on your Debian 11.0 server. Access the installation page and complete the process by connecting your database, creating an administrator account, and configuring your site. Visit the official documentation to learn more on how to use Backdrop CMS.

Want to contribute?

You could earn up to $600 by adding new articles.