How to Install Drupal on Debian Latest

Drupal is a powerful content management system used for building and managing websites. It is a free, open-source software that is easy to use and highly customizable. In this tutorial, we will guide you through the process of installing Drupal on Debian Latest.

Prerequisites

Before starting the installation process, make sure that you have the following:

Step 1: Install Apache, PHP, and MySQL

If you haven't installed Apache, PHP, and MySQL/MariaDB on your server, you can install them using the following command:

sudo apt update
sudo apt install apache2 mysql-server php php-mysql 

Step 2: Create a MySQL Database for Drupal

The next step involves creating a MySQL database and user for Drupal. You can do this using the command line or a graphical tool like phpMyAdmin.

Using the Command Line

  1. Log in to the MySQL shell:
sudo mysql -u root -p
  1. Create a new database:
CREATE DATABASE drupal_db;
  1. Create a new user and set a password:
CREATE USER 'drupal_user'@'localhost' IDENTIFIED BY 'password';
  1. Grant permissions to the new user on the new database:
GRANT ALL PRIVILEGES ON drupal_db.* TO 'drupal_user'@'localhost';
  1. Flush the privileges:
FLUSH PRIVILEGES;

Step 3: Download Drupal

Download the latest version of Drupal from the official Drupal website using the following command:

wget https://www.drupal.org/download-latest/tar.gz -O drupal.tar.gz

Extract the downloaded file using the following command:

tar -zxvf drupal.tar.gz

Move the extracted Drupal files to the Apache document root directory:

sudo mv drupal-x.x.x/* /var/www/html/

Step 4: Configure Drupal

  1. Rename the configuration file:
cd /var/www/html
sudo cp sites/default/default.settings.php sites/default/settings.php
  1. Give the Apache user (www-data) ownership of the files:
sudo chown -R www-data:www-data /var/www/html/
  1. Give the Apache user (www-data) write permissions to the sites/default folder:
sudo chmod -R 755 /var/www/html/sites/default
  1. Set up the Drupal installation using the web-based installer. In your browser, navigate to your server's IP address or domain name, followed by /install.php.

  2. Follow the on-screen instructions to configure the Drupal installation. When prompted for the database settings, enter the database name, username, and password you created in Step 2.

  3. Set up a unique user account for yourself, and then log in to the Drupal dashboard.

Conclusion

Congratulations! You have successfully installed Drupal on Debian Latest. Now you can start building and managing your new Drupal website. If you encounter any issues during the installation process, refer to the Drupal documentation or ask for help on the Drupal community forum.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!