How to Install Backdrop CMS on FAMP (FreeBSD 11.1)

By Arslan Ud Din Shafiq, Alibaba Cloud Tech Share Author

Backdrop is an open source and free content management system (CMS). It is fork of Drupal, mobile-friendly, and fast. You don’t need to know any programming language for using Backdrop CMS. You can easily create, edit, and manage your content.

Backdrop CMS provides you with a multi-level user experience. This means that you can set different levels of permissions to different people. Backdrop CMS has add-ons, plugins, themes and layouts. You can use them directly; you don’t need to search for other add-ons or themes. Even if you need to modify its API, you can do this according to your needs.

If you are using Drupal 7, you can upgrade to Backdrop CMS with its built-in upgrade path from Drupal 7. Backdrop is compatible and works well with Alibaba Cloud Elastic Compute Service (ECS) servers. As a developer, I prefer the services of Alibaba Cloud to host my Backdrop CMS. Alibaba Elastic Compute (ECS) is highly flexible and you can upgrade the hardware resources anytime when you get more traffic.

Backdrop CMS does not restrict its installation to any specific operating system (OS). You can use any operating system (OS) of your choice; however, the installation steps would vary according to the choice of operating system.

In this tutorial, I will be using Alibaba Cloud Elastic Compute Service (ECS) with FreeBSD 11.1 installed on it.


1.You must have Alibaba Cloud Elastic Compute Service (ECS) activated. If you are a new user, you can Free Credits in your Alibaba Cloud account. If you don’t know about how to setup your ECS instance, you can refer to this tutorial or check quick-start guide.

2.You should setup your server’s hostname.

3.Access to VNC console in your Alibaba Cloud or SSH client installed in your PC.

Logging In to Your Console

After completing the prerequisites, login as root user with your root username & password via SSH client (e.g. Putty — You can get Putty from ) or VNC console available in your Alibaba Cloud account dashboard.

Install Sudo

1.To assign sudo rights to a user, we will need to install sudo first. To do this, execute the command below:

2.You will be prompted to give permission to proceed installation. Type ‘y’ and hit Enter key.

Add a User with Root Privileges

1.To add a new user with root/admin privileges, use the following command:

2.For Username, type your selected username and hit Enter key.

3.For Full Name, type your full name and hit Enter key.

4.For Uid, leave the field empty and hit Enter key.

5.For Login group, type wheel and hit Enter key.

6.For Invite username into other groups?, leave blank and hit Enter key.

7.For Login class, type default and hit Enter key.

8.For Shell, type sh and hit Enter key.

9.For Home Directory, type /home/your_username and hit Enter key.

10.For Home Directory Permissions, leave the field blank and hit Enter key.

11.For Use password-based authentication, type yes and hit Enter key.

12.For Use and empty password, type no and hit Enter key.

13.For Use a random password, type no and hit Enter key.

14.Now you will be prompted to enter password. Type password of your choice and hit Enter key.

15.Retype the password and hit Enter key.

16.For “Lock out the account after creation?, type no and hit Enter key.

17.For OK?, type yes and hit Enter key.

18.Now you will be asked to add another user, type no and hit Enter key.

19.New user with sudo/admin rights have been created successfully.

Note: “aaree” can be any username of your choice.

20.After execution of the above command, you can verify the membership of for that group by executing the following command:

The above screenshot shows that username “aaree” is part of “wheel”.

21.Now you will need to edit sudoers file to uncomment the line shown in screenshot below to give sudo rights to wheelgroup. For this, we will check /etc/sudoers file and see whether sudoers group is enabled or not. For this purpose, we will execute the following command.

22.After executing the above command, you will see the following lines in the opened file.

Remove the # from its start to uncomment the line. Otherwise, your username will not be able to execute sudo command.

To remove this, make your cursor on # and press r key and then press spacebar key. After it type :x and hit Enter key to save changes.

23.Now, log in to your new account by with recently created credentials OR You can switch from root user to your username by using the following command:

To verify from which account, you have been logged in, type the following command and hit Enter key.

Update Your FreeBSD 11.1 System

Before proceeding towards installation of any kind of package, execute the command below to update your CentOS system.

Note: To execute this command, remember to login from non-root user with sudo privileges.

Now, you will be prompted to type your password to confirm. Type your password and hit Enter key and wait until your screen shows status “Complete!”.

You will be prompted to proceed with this action, type ‘y’ and hit Enter key.

Install Apache Web Server

1.To install the apache web-server, you will need to execute the following command:

You may be prompted to enter your password. Now type your password and hit Enter key.

Now you will be asked to enter y/N, type ‘y’ and then hit Enter key and wait for updating.

2.Apache Web Server has been installed successfully.

3.Now enable apache server to run automatically when you boot your ECS. For that, execute the commands below:

4.Now execute the command below to start Apache service. You may be asked to enter password again.

5.To ensure that you have installed Apache correctly, you can check by accessing your IP through your browser. You should see the following page.

6.To ensure that your DocumentRoot directive is pointing to correct directory, check your Apache configuration file by using the following command:

Note: The configuration for DocumentRoot should look as given below.

7.Now we need to enable mod_rewrite. To load mod_rewrite, you will need to uncomment the following line in Apache configurations.

This line is commented by default. To load mod_rewrite, remove # to uncomment this line. To do so, point the cursor to # and press r and then press spacebar key. Now type :x and press Enter key to save your changes.

8.To make the changes work correctly, we will need to restart apache. To do so, execute the command below:

Setup Firewalls for HTTP and HTTPS

If you have activated firewalls, you will have to define a rule in Alibaba Cloud security group for your cloud server to add exception for port 80/tcp, 443/tcp. You can enable these ports while creating ECS instance, but in case, if you have forgotten to unblock these ports, you can follow the procedure below. By default, these ports are blocked by the firewalls.

To do this follow the following instructions:

1.Go to your Elastic Compute Service section. Click on more button for ECS you are making ready for Backdrop CMS:

2.Click on Configure Rules.

3.Click on Quickly Create Rules.

4.Add the configurations as shown in screenshot below & click OK.

Install PHP 7.1

1.Now you will have to install PHP 7.1 along with its required modules necessary for Backdrop CMS. To do this, execute the following command.

2.You will be prompted to proceed with the above action. Enter y and hit Enter key to proceed.

After successful installation of PHP modules, you will see the screen as follows:

3.Now you need to configure Apache to use PHP. For this purpose, create a new file php.conf in Includes directory of Apache. To do so, execute the following command:

Now add the following text in opened file and type :x and hit Enter key to save the file.

<IfModule dir_module>
DirectoryIndex index.php index.html
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source

4.Now restart Apache service to reload the changes. Use the following command:

Install MariaDB (MySQL) Server

1.In replacement of MySQL server, FreeBSD uses MariaDB server by default. To install MariaDB, use the following command:

Alibaba Cloud AsparaDB for RDS is a good alternative and I highly recommend it. Alibaba Cloud AsparaDB for RDS frees you from managing a database and you can focus on your business. It is a ready to use service. It provides protection against SQL injections, network attacks, brute force attacks and many other types of database attacks. It is highly scalable, available and secure with ease of use.

2.You will be prompted to ask whether to take action or not. Type y and hit Enter key. MariaDB Server has been installed successfully.

3.Now, enable MariaDB server to start automatically when system reboot. To do so, use the following commands:

4.Now to secure your MariaDB server, execute the command:

The root password will be blank by default, just hit enter button to proceed and select ‘Y’ and choose your password.

Create a Database

1.Use MariaDB shell to login as root user and execute the following command:

2.Now the command prompt will ask you to enter password for user ‘root’. Enter the password and hit enter key, you will be prompted to MariaDB command prompt.

3.To create the database and user for this database for your Backdrop CMS, use the following query:

CREATE DATABASE backdrop_db CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'backdrop_user'@'localhost' IDENTIFIED BY 'SecurePassword';
GRANT ALL PRIVILEGES ON backdrop_db.* TO 'backdrop_user'@'localhost';

where backdrop_db can be changed to your desired name database name and backdrop_user can be changed to your desired username.

Install Backdrop CMS

1.Navigate to cd /usr/local/www/apache24/data

2.To confirm your current directory use the command:

3.Now use the following command to get Backdrop CMS package for installation.

If the above command gives any error, or you need to install latest version of Backdrop CMS, click here to get the link of latest version.

4.To list the files in current directory, use the command:

5.Now unzip the compressed zip folder as listed when executed ls -la command. To do so, use the command:

6.Now move all of the files to web root directory. To do so, execute the following command:

7.Change owner of files to avoid permissions issues. Execute command below:

8.After performing the above steps, restart Apache using the command:

Congratulations! It’s time to access your Backdrop CMS via IP address.

Complete the Installation of Backdrop CMS

1.Before opening installation file of Backdrop CMS, you will have to confirm database settings in settings.php file.

2.Find the line below in the opened file and edit it to update your database settings and type :x and then hit Enter key to save changes.

3.To access Backdrop CMS, use the IP address of your ECS in your browser’s address box and hit enter. My ECS IP address is

In case you are unable to access via IP address, try appending /index.php to the IP address. For my example, it will be

4.Click Save and Continue to proceed installation of Backdrop CMS.

5.After completion of installation, you will see the following form. Fill the details regarding your website and setup web admin credentials and then press Save and Continue.

6.That’s it! You can now access your Backdrop CMS website through your Alibaba Cloud ECS IP address. In my case, I accessed using


Follow me to keep abreast with the latest technology news, industry insights, and developer trends.