Backdrop is a free, open source content management system that can be used by anyone, with or without software development knowledge, to cover many aspects of development and managing content, such as creating blogs.
One of its major advantages is the ease of use, which means that it can be easily used by non technical persons. Other benefits include:
- It is open source and has no licensing costs;
- It allows different users to have different levels of permissions to access its content;
- It allows users to use it from mobile devices such as phones and tablets, meaning that users can work from anywhere;
- It is very fast even when used on shared hosts;
- It is very secure, with a robust security system;
- It has a configuration interface that allows users to easily and quickly make configuration updates.
In this article, I am going to explain how to install and configure Backdrop CMS on an Ubuntu server. Before we start, here are the prerequisites for the process:
- An Ubuntu server, running on version 16.04 or later version;
- A user with root access to the server;
- A static IP address on the server.
Step 1: System Update/Upgrade
The first, and a very basic step, when installing new software on an Ubuntu system, is to update the system. You can do that by running this command:
sudo apt-get update
sudo apt-get upgrade
Step 2: Installing LAMP
We will need to install the LAMP stack because we will need MariaDB, Nginx and PHP7 among other PHP modules for Backdrop CMS to work. To install them, run these commands:
sudo apt-get install nginx mariadb-server php7.0 php7.0-cli php7.0-fpm php7.0-mbstring php7.0-mysql php7.0-gd php7.0-mcrypt php7.0-imap uw-mailutils libgd-tools libmcrypt-dev mcrypt php-pear libgd-dev
After successfully installing them, run the following commands which starts mariadb and nginx and starts them automatically at boot;
sudo systemctl start nginx
sudo systemctl start mysql
sudo systemctl enable nginx
sudo systemctl enable mysql
Step 3: MariaDB Configuration
The first step is to make sure that the MariaDB installation is secured. This can be done by running MySQL secure installation script, by this command:
sudo mysql_secure_installation
This will prompt a number of questions, that you will need to answer. After completing the questions, log into MariaDB to create a Backdrop database. You can do so using the command below:
mysql -u root -p
This will ask you for your password, enter it and press enter. The next step is then to create the Backdrop database, a user and give the user the privileges to use the database. This can be done by the following commands:
MariaDB [(none)]> CREATE DATABASE backdropdb;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON backdropdb.* TO 'bduser'@'localhost' IDENTIFIED BY 'password';
MariaDB [(none)]> FLUSH PRIVILEGES;
After that, you will need to exit from Mysql by:
MariaDB [(none)]> \q
Step 4: Installing Backdrop
A stable version of Backdrop can be found from Github or its website. I am going to download it from Github, using this command:
wget https://github.com/backdrop/backdrop/releases/download/1.6.0/backdrop.zip
Use this command to unzip it and then move it to Ngix directory when the download completes:
unzip backdrop.zip
mv backdrop /var/www/html/
We will also need to change the backdrop directory’s owner, by running:
sudo chown -R www-data:www-data /var/www/html/backdrop
Step 5: Configuring Nginx
Backdrop will need a virtual host from Nginx, which we are going to create by running this command to open a new configuration file for editing:
sudo nano /etc/nginx/conf.d/backdrop.conf
We will then need to delete the default configuration file by running:
sudo rm -rf /etc/nginx/conf.d/default.conf
The www.conf and php.ini files also need to be amended. Start by the www.conf file by running:
sudo nano /etc/php/7.0/fpm/pool.d/www.conf
and then change this line listen =/run/php/php7.0-fpm.sock to listen = 127.0.0.1:9000; and save the file.
Then run
sudo nano /etc/php/7.0/cli/php.ini
Then, save and exit.
Step 6: Testing Nginx
We will now test Nginx to see if it has any syntax errors. This can be done by running this command;
sudo nginx -t
At this stage, everything is set up and running well now. The final step here will be to restart Nginx and php7.0-fpm. This can be done by the following commands:
sudo systemctl restart php7.0-fpm
sudo systemctl restart nginx
Step 7: Accessing Backdrop
We are now going to access the web interface for Backdrop. Open your web browser and type in this link. I will use the static IP address that I set up, my URL is http://192.168.15.110.
Choose your language then click on the save button.
Next, fill in the database name, user and password then click on the save button.
Fill in the final information then click on the save button again. This takes you to the welcome page.
Conclusion
You can now create your own content and enjoy using a very easy to use content management system on your server.
You can now go ahead to create more users, where you can be able to assign different roles to the users you have created. Backdrop comes with a robust system for granting users different roles matching your needs. You will also realize that you can easily customize anything you want, unlike other content management systems, with only a few lines of code.