How to Install Thelia on Manjaro

Thelia is an open-source e-commerce platform that allows you to easily create online stores for your products. In this tutorial, we will guide you through the steps to install Thelia on Manjaro.

Prerequisites

Before starting the installation process, you will need the following:

Step 1: Install Apache web server

Apache web server is a widely-used web server that is needed to run Thelia. To install Apache, run the following command in your terminal:

sudo pacman -S apache

After installation, start the Apache web server using the following command:

sudo systemctl start httpd

To verify if Apache is running, open your web browser and type in http://localhost. If Apache is running, you will see a page displaying "Apache is working!"

Step 2: Install PHP

Thelia requires PHP 7.3 or later to run. To install PHP and its necessary extensions, run the following command in your terminal:

sudo pacman -S php php-apache php-gd php-mysql php-zip

After installing PHP, restart the Apache web server using the following command:

sudo systemctl restart httpd

To verify if PHP is installed and enabled, create a new PHP file in your web root directory using the following command:

sudo nano /srv/http/info.php

Paste the following contents into the file:

<?php phpinfo(); ?>

Save and close the file. Now, open your web browser and type in http://localhost/info.php. If PHP is installed and enabled, you will see the PHP configuration information.

Step 3: Install MySQL

Thelia requires a database server to store its data. You can use either MySQL or MariaDB. To install MySQL, run the following command in your terminal:

sudo pacman -S mysql

After installation, start the MySQL service using the following command:

sudo systemctl start mysqld

To secure your MySQL installation, run the following command:

sudo mysql_secure_installation

Follow the prompts to set a root password and remove any unnecessary users and databases.

Step 4: Configure the database

To configure the database for Thelia, you need to create a new database, user, and password. To do this, log in to the MySQL server using the following command:

sudo mysql -u root -p

Enter the root password when prompted. Then, create a new database using the following command:

CREATE DATABASE thelia;

Create a new user and password using the following command:

CREATE USER 'theliauser'@'localhost' IDENTIFIED BY 'password';

Grant the user permissions to access the database using the following command:

GRANT ALL PRIVILEGES ON thelia.* TO 'theliauser'@'localhost';

Finally, flush the privileges and exit the MySQL server using the following commands:

FLUSH PRIVILEGES;
EXIT;

Step 5: Clone Thelia from GitHub

Next, you need to clone the latest version of Thelia from GitHub. To do this, run the following command in your terminal:

git clone https://github.com/thelia/thelia.git

This will clone the Thelia repository into a new folder called "thelia" in your current directory.

Step 6: Install Thelia

To install Thelia, navigate to the "thelia" directory and run the following command:

php composer.phar install --no-dev --prefer-dist

This will install all necessary dependencies for Thelia.

Step 7: Configure Thelia

Now, you need to configure Thelia to connect to the database you created earlier. To do this, copy the "app/config/parameters.yml.dist" file to "app/config/parameters.yml" using the following command:

cp app/config/parameters.yml.dist app/config/parameters.yml

Then, open the "app/config/parameters.yml" file using a text editor and update the database connection information with the following:

parameters:
    database_driver: pdo_mysql
    database_host: 127.0.0.1
    database_port: 3306
    database_name: thelia
    database_user: theliauser
    database_password: password
    ...

Save and close the file.

Step 8: Set file permissions

You need to set the correct file permissions for Thelia to run properly. To do this, run the following commands:

sudo chown -R http:http /path/to/thelia
sudo chmod -R 775 /path/to/thelia

Replace "/path/to/thelia" with the path to your Thelia install directory.

Step 9: Test Thelia

Finally, you can test your Thelia installation by opening your web browser and navigating to http://localhost/thelia/setup/. Follow the on-screen instructions to complete the installation wizard.

After installation, you can access the Thelia admin panel by navigating to http://localhost/thelia/admin/login.

Congratulations, you have successfully installed Thelia on Manjaro!

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!