How to Install Backdrop CMS on Debian Latest
Backdrop CMS is a lightweight and easy-to-use open-source content management system that allows users to create, manage, and publish web content easily. This tutorial will guide you through the process of installing Backdrop CMS on Debian Latest.
Requirements
Before we begin, make sure you have the following requirements:
- Debian Latest operating system
- Apache/Nginx webserver
- PHP (version 7.2 or newer)
- MySQL/MariaDB database server
Step 1: Install Apache/Nginx webserver
You can install the Apache webserver using the following command:
sudo apt-get update
sudo apt-get install apache2
Alternatively, if you prefer to use Nginx, you can install it using the following command:
sudo apt-get update
sudo apt-get install nginx
Step 2: Install PHP
Install PHP by running the following command:
sudo apt-get install php php-curl php-gd php-mbstring php-xml php-zip
Step 3: Install MySQL/MariaDB
You can install MySQL/MariaDB by running the following command:
sudo apt-get install mysql-server mysql-client
Step 4: Download the Backdrop CMS
Download the latest version of Backdrop CMS from their official website at https://backdropcms.org/download, or you can download it directly via wget.
wget https://github.com/backdrop/backdrop/releases/download/1.18.3/backdrop.zip
Step 5: Extract and Move Backdrop CMS
Extract the downloaded file using the following command:
unzip backdrop.zip
Move the extracted files to your web directory, for example, for Apache:
sudo mv backdrop /var/www/html/
For Nginx:
sudo mv backdrop /usr/share/nginx/html/
Step 6: Create a New Database
Log in to your MySQL/MariaDB database server and create a new database for Backdrop CMS:
mysql -u root -p
CREATE DATABASE backdrop;
GRANT ALL PRIVILEGES ON backdrop.* TO 'backdropuser'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
EXIT;
Step 7: Configure Backdrop CMS
Rename the example.settings.local.php to settings.local.php and add your database credentials:
cd /var/www/html/backdrop/
cp example.settings.local.php settings.local.php
nano settings.local.php
Replace the following settings with your database credentials:
$databases['default']['default'] = array(
'driver' => 'mysql',
'database' => 'backdrop',
'username' => 'backdropuser',
'password' => 'password',
'host' => 'localhost',
'port' => '',
'prefix' => '',
'collation' => 'utf8mb4_general_ci',
);
Step 8: Set Permissions
Set the correct permissions to the following files and directories:
cd /var/www/html/backdrop/
sudo chown www-data:www-data -R .
sudo chmod -R 755 .
sudo chmod -R g+w sites/default/files
Step 9: Set File Upload Limit
To upload files to Backdrop CMS, you need to set the file upload limit in your php.ini file:
sudo nano /etc/php/7.4/apache2/php.ini
Find the following line:
upload_max_filesize = 2M
Change the size to the desired upload limit:
upload_max_filesize = 64M
Step 10: Restart the Web Server
Restart the Apache/Nginx webserver using the following command:
sudo systemctl restart apache2
Alternatively, if you choose to use Nginx, run the following command:
sudo systemctl restart nginx
Step 11: Access Backdrop CMS
Open your web browser and visit your server's IP address or domain name. You should see the Backdrop CMS installation page. Follow the instructions to complete the installation.
Congratulations! You have successfully installed Backdrop CMS on Debian Latest.