Thelia is an open-source e-commerce solution that allows you to build and manage online stores. In this tutorial, we will show you how to install Thelia on Ubuntu Server.
Before starting the installation process, make sure your system is updated with the latest packages.
sudo apt-get update
sudo apt-get upgrade
If you don't have LAMP stack installed on your server, you can install it using the following command:
sudo apt-get install apache2 mysql-server php7.4 libapache2-mod-php7.4 php-mysql
After the installation, start the Apache and MySQL services, and enable them to start automatically on system restart.
sudo systemctl start apache2
sudo systemctl start mysql
sudo systemctl enable apache2
sudo systemctl enable mysql
Thelia requires some dependencies to be installed beforehand. Install the dependencies using the following command:
sudo apt-get install php-curl php-gd php-intl php-json php-mbstring php-xml php-zip php-cli unzip
Composer is a dependency manager for PHP. You can install the latest version of Composer using the following command:
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
Clone the Thelia repository using the following command:
cd /var/www/html/
sudo git clone https://github.com/thelia/thelia.git
Change the current directory to the Thelia root directory, and run the following commands:
cd thelia/
sudo composer install
This command installs all the required dependencies for Thelia.
Create an empty database and user for Thelia using the following command:
sudo mysql -u root -p
Enter your MySQL root user password when prompted. Once you are in the MySQL console, execute the following commands:
CREATE DATABASE thelia;
CREATE USER 'thelia_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON thelia.* TO 'thelia_user'@'localhost';
FLUSH PRIVILEGES;
exit;
Replace password
with your preferred password.
Copy the .env.dist
file and create a new .env
file using the following command:
sudo cp .env.dist .env
Open the .env
file and set the following variables:
DATABASE_URL=mysql://thelia_user:password@localhost/thelia
SMTP_HOST=localhost
SMTP_PORT=1025
SECRET=secret-key
Replace password
with the password you set in Step 7, and replace secret-key
with your preferred secret key.
Run the following command to generate the key:
sudo php Thelia generate:key
This command generates a unique key for your Thelia installation.
Run the following command to complete the installation:
sudo php Thelia install
This command installs Thelia and sets up the database tables.
Open your web browser and navigate to your server's IP address or domain name. You should see the Thelia welcome screen.
Congratulations! You have successfully installed Thelia on your Ubuntu Server.
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!