Install Backdrop CMS on Ubuntu 20.04
-
by cobra_admin
- 49
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:
- An Ubuntu 20.04 server
- A non-root user
- A LAMP Stack.
Optionally, you could deploy a Vultr One-Click LAMP server.
1. Install Dependencies
- SSH to your server as a non-root
sudo
user. - Update the package information index.
$ sudo apt update
- Install the
libapache2-mod-php
module.$ sudo apt install -y libapache2-mod-php
- Enable the Apache
rewrite
module, which allows Backdrop to write shorter and friendly URLs.$ sudo a2enmod rewrite
- Restart Apache to load the new changes.
$ sudo systemctl restart apache2
- Install the
unzip
package, 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 -p
- Create a
backdrop
database and a privilegedbackdrop_user
account.Execute the appropriate SQL statements for your database server and replaceEXAMPLE_PASSWORD
with 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/backdrop
directory under the root of your web server.$ sudo mkdir -p /var/www/backdrop
- Take ownership the new
/var/www/backdrop
directory.$ sudo chown -R $USER:$USER /var/www/backdrop
- Navigate to the new directory.
$ cd /var/www/backdrop
- Visit 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.zip
- Extract the zip file to your current directory.
$ sudo unzip backdrop.zip
- Move the contents of the extracted
backdrop
directory to/var/www/backdrop
.$ sudo mv backdrop/* /var/www/backdrop
- Give ownership of the
/var/www/backdrop
directory towww-data
.$ sudo chown -R www-data:www-data /var/www/backdrop
- Delete the
backdrop.zip
file.$ 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.conf
host file.$ sudo a2dissite 000-default.conf
- Create a new
backdrop.conf
file for the Backdrop package.$ sudo nano /etc/apache2/sites-available/backdrop.conf
- Paste the information below into the file. Replace
example.com
with 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.conf
file.$ sudo a2ensite backdrop.conf
- Restart 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.com
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…
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…