How to Install Thelia on Debian Latest?

Thelia is a free and open-source e-commerce software that allows you to create and manage online stores. In this tutorial, we will show you how to install Thelia on a Debian Linux system.

Requirements

To install Thelia on Debian, you will need the following:

Step 1: Update Packages

Before proceeding any further, it's recommended that update the package repository of your Debian system by running the following command:

sudo apt-get update

Step 2: Install Required Packages

Thelia requires Apache, PHP, and MySQL/MariaDB to be installed on your Debian system. You can install all these packages by running this command:

sudo apt-get install apache2 mysql-server php php-curl php-gd php-intl php-mbstring php-mysql php-zip

You will be prompted to set a root password for the MySQL/MariaDB database server during the installation.

Step 3: Configure Apache

Next, we need to configure Apache to enable mod_rewrite and mod_php. You can do this by running the following commands:

sudo a2enmod rewrite
sudo a2enmod php7.3

Then, restart Apache using the following command:

sudo systemctl restart apache2

Step 4: Install and Configure Thelia

To download and install Thelia, you need to follow the below steps:

Step 4.1: Download and Extract Thelia

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

wget https://github.com/thelia/thelia/releases/download/v2.4.4/thelia-2.4.4.zip

Unzip the downloaded file to the Apache web server document root directory with the following commands:

sudo unzip thelia-2.4.4.zip -d /var/www/html/
sudo mv /var/www/html/thelia-2.4.4 /var/www/html/thelia

Step 4.2: Create a MySQL Database for Thelia

Create a MySQL/MariaDB database and user for Thelia using the following commands:

sudo mysql -u root -p
CREATE DATABASE theliadb;
CREATE USER 'theliauser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON theliadb.* TO 'theliauser'@'localhost';
FLUSH PRIVILEGES;
exit;

Step 4.3: Configure Thelia

To configure Thelia, you need to edit the following configuration files:

sudo nano /var/www/html/thelia/local/config/parameters.yml

Change the database settings as shown below:

parameters:
    ...
    database_driver: "pdo_mysql"
    database_host: "localhost"
    database_port: "3306"
    database_name: "theliadb"
    database_user: "theliauser"
    database_password: "password"
    ...

Then, save the file and exit.

sudo nano /var/www/html/thelia/local/.htaccess

Change the following line:

RewriteBase /thelia/

to:

RewriteBase /thelia

Then, save the file and exit.

Finally, set the correct permissions on the Thelia files with the following command:

sudo chown -R www-data:www-data /var/www/html/thelia/

Step 5: Access Thelia

Now, you can access Thelia on your Debian system by entering the following URL in your web browser:

http://your-server-ip/thelia/

You will see the installation page, where you can follow the steps to complete the installation process.

Enter the database details that you created in Step 4.2 and continue with the installation.

After completion of the installation process, you will be redirected to the Thelia dashboard, where you can manage your online store.

Conclusion

In this tutorial, we have shown you how to install and configure the Thelia e-commerce software on a Debian Linux system. You can now start configuring your online store and adding products to it.

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!