How to Install Backdrop CMS on Ubuntu Server
Are you using Ubuntu Server and in need of a new content management system for your website? Consider deploying Backdrop CMS, an open-source tool for Linux that simplifies website management. In this guide, we will show you how to set up Backdrop CMS on your Ubuntu system.
How to Install the Backdrop CMS Dependencies on Ubuntu Server
The Backdrop CMS system requires several dependencies that the user must install, including the Apache web server, MySQL, PHP, and several PHP extensions. To start the installation of these dependencies, launch a terminal and SSH into the server or launch a terminal physically.
Once the terminal is open, use the apt update command to check for software updates:
sudo apt update
After running the apt update command, install any pending software updates on your Ubuntu Server system by entering the following apt upgrade command. Keep in mind that this update could take a while, especially if you have many packages to download.
sudo apt upgrade
Once everything is up to date, it’s time to install the dependencies. Use the following apt install command to set up Apache, PHP, SQL, and the required PHP extensions.
sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql php-gd php-curl php-xmlrpc
With all the dependencies installed, you will need to run a MySQL installation. To do that, execute the command below.
sudo mysql_secure_installation
When you run the command above, you will be prompted to enter a secure password for your MySQL account. For added security, consider using the Bitwarden password generator to create a strong and memorable password.
How to Create an SQL Database for Backdrop CMS on Ubuntu Server
Backdrop CMS requires MySQL for its database needs. Due to this, you need to create a new database to use the software on Ubuntu Server. To get started, log into MySQL on Ubuntu Server using the following command:
sudo mysql -u root -p
Then, create the database using the following command:
CREATE DATABASE backdrop;
Next, create a new user using the CREATE USER command. Be sure to change “password” with a strong password generated by the Bitwarden password generator.
CREATE USER 'backdropuser'@'localhost' IDENTIFIED BY 'password';
After that, use the GRANT ALL command to grant all privileges to the new user on the Backdrop SQL database.
GRANT ALL PRIVILEGES ON backdrop.* TO 'backdropuser'@'localhost';
Finally, once the SQL database is set up, use the FLUSH PRIVILEGES command and the exit command to log out of MySQL.
FLUSH PRIVILEGES;
exit;
How to download Backdrop CMS to Ubuntu Server
To download the Backdrop CMS app to your computer, use the following wget download command.
wget https://github.com/backdrop/backdrop/releases/download/1.24.1/backdrop.zip
If you do not wish to download the software using wget, you can get it from the official Backdrop download page.
How to install and configure Backdrop CMS on Ubuntu Server
To install the Backdrop CMS software on your Ubuntu Server system, you need to extract it first. Backdrop CMS is distributed via a ZIP file, so you’ll need to have the Unzip tool installed on your server to extract it. To install the Unzip tool on your Ubuntu Server, use the following apt install command:
sudo apt install unzip
After installing the Unzip tool, you can use the unzip -d command to extract the Backdrop.zip file to the /var/www/html/ directory (the default folder for Apache). Be sure to change “MY_WEBSITE_NAME” to the desired name of your website:
sudo mkdir -p /var/www/html/MY_WEBSITE_NAME sudo unzip backdrop.zip -d /var/www/html/MY_WEBSITE_NAME
Alternatively, if you wish to install Backdrop to the root Apache directory, do the following:
sudo unzip backdrop.zip -d /var/www/html/
Once the Backdrop software is installed, update the permissions:
sudo chown -R www-data:www-data /var/www/html/backdrop/ sudo chmod -R 755 /var/www/html/backdrop/
If you installed to the root directory instead, use this instead:
sudo chown -R www-data:www-data /var/www/html/ sudo chmod -R 755 /var/www/html/
Next, open up the following URL in a web browser connected to the server:
http://YOUR_SERVER_IP_ADDRESS_OR_HOSTNAME/backdrop
Or, if you installed it to the root directory, use this instead:
http://YOUR_SERVER_IP_ADDRESS_OR_HOSTNAME
When the Backdrop app opens in your browser, you’ll see a GUI setup tool for Backdrop. To begin, select your language and then select “Save and continue.”
After selecting “Save and continue,” Backdrop will check your Ubuntu server to see if everything is configured correctly. If everything is correct, you’ll be prompted to set up your database.
In the “MySQL Database name” field, enter “backdrop”. In the “Database username” field, enter “backdropuser,” and in “Database password,” enter the strong password you created earlier during the SQL setup process.
With your SQL database configured, Backdrop will fully install itself on your Ubuntu Server, and you can configure your website with the Backdrop CMS system. Configure your site in the “Configure your site” area and click “Save and continue” when done to start using your website.