Introduction
Backdrop CMS is a lightweight Content Management System. It was initially forked from Drupal CMS and features a refactored administration panel. Backdrop CMS is suitable for small and medium organizations and is maintained by an active developer community. This guide explains how to install Backdrop CMS on Ubuntu 20.04 server.
Prerequisites
To follow the steps in this guide, you need:
Optionally, you could deploy a Rcs One-Click LAMP server.
1. Install Dependencies
SSH to your server as a non-root
sudouser.Update the package information index.
$ sudo apt updateInstall the
libapache2-mod-phpmodule.$ sudo apt install -y libapache2-mod-phpEnable the Apache
rewritemodule, which allows Backdrop to write shorter and friendly URLs.$ sudo a2enmod rewriteRestart Apache to load the new changes.
$ sudo systemctl restart apache2Install the
unzippackage, which you will need to extract the Backdrop installation archive.$ sudo apt install -y unzip
2. Create Database and User Account
Backdrop works with either MySQL or MariaDB server as the backend.
Connect to your Database server as
root.$ sudo mysql -u root -pCreate a
backdropdatabase and a privilegedbackdrop_useraccount.Execute the appropriate SQL statements for your database server and replace
EXAMPLE_PASSWORDwith a strong password.If you use MySQL:
mysql> CREATE DATABASE backdrop; CREATE USER 'backdrop_user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'EXAMPLE_PASSWORD'; GRANT ALL PRIVILEGES ON backdrop.* TO 'backdrop_user'@'localhost'; FLUSH PRIVILEGES;If you use MariaDB:
MariaDB> CREATE DATABASE backdrop; GRANT ALL PRIVILEGES on backdrop.* TO 'backdrop_user'@'localhost' identified by 'EXAMPLE_PASSWORD'; FLUSH PRIVILEGES;Log out of the database server.
mysql> EXIT;
3. Download Backdrop from GitHub
Create a new
/var/www/backdropdirectory under the root of your web server.$ sudo mkdir -p /var/www/backdropTake ownership the new
/var/www/backdropdirectory.$ sudo chown -R $USER:$USER /var/www/backdropNavigate to the new directory.
$ cd /var/www/backdropVisit the official Backdrop download page on GitHub and copy the download link of the latest stable version.
Download the Backdrop installation archive file.
$ sudo wget https://github.com/backdrop/backdrop/releases/download/1.19.3/backdrop.zipExtract the zip file to your current directory.
$ sudo unzip backdrop.zipMove the contents of the extracted
backdropdirectory to/var/www/backdrop.$ sudo mv backdrop/* /var/www/backdropGive ownership of the
/var/www/backdropdirectory towww-data.$ sudo chown -R www-data:www-data /var/www/backdropDelete the
backdrop.zipfile.$ sudo rm backdrop.zip
4. Create a Virtual Host File
Apache reads virtual hosts configurations from the /etc/apache2/sites-available directory.
Disable the default
000-default.confhost file.$ sudo a2dissite 000-default.confCreate a new
backdrop.conffile for the Backdrop package.$ sudo nano /etc/apache2/sites-available/backdrop.confPaste the information below into the file. Replace
example.comwith your domain name or server's public IP address.<VirtualHost *:80> ServerName example.com DocumentRoot "/var/www/backdrop" <Directory "/var/www/backdrop"> Require all granted Options -Indexes +FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>Save and close the file.
Enable the new
backdrop.conffile.$ sudo a2ensite backdrop.confRestart Apache to load the new configuration.
$ sudo systemctl restart apache2
5. Complete Backdrop Installation
Navigate to your server's public IP address or domain name in a web browser to complete the installation. For example:
http://example.comMore Information
See the Backdrop CMS documentation for more information.