How to install PrestaShop?
Installing PrestaShop on Ubuntu
Step 1: Update and Upgrade Ubuntu
Before installing PrestaShop, ensure your Ubuntu system is up-to-date. Run the following commands to update the package index and upgrade the system:
| sudo apt update && sudo apt upgrade -y |
Step 2: Install Apache Web Server
Next, install the Apache web server using the following command:
| sudo apt install apache2 |
This command installs the Apache web server and its dependencies.
Step 3: Configure Apache to Allow .htaccess Files
By default, Apache does not allow `.htaccess` files to override its configuration settings. To enable this feature, open the default Apache configuration file using a text editor:
| sudo nano /etc/apache2/sites-available/000-default.conf |
Add the following code before the </VirtualHost> closing tag:
| <Directory /var/www/html>
AllowOverride All </Directory> |
This configuration change allows `.htaccess` files to override Apache settings. Save and close the file.
Next, enable the `mod_rewrite` Apache module, which is required for PrestaShop:
| sudo systemctl restart apache2 |
Step 4: Install PHP
PrestaShop is built using PHP, so install it on your Ubuntu system:
| sudo apt install php libapache2-mod-php php-mysql php-curl php-gd php-dom php-xml |
Step 5: Install MariaDB
PrestaShop stores data in a database, so install MariaDB:
| sudo apt-get install mariadb-server |
Secure your MariaDB installation by running:
| sudo mysql_secure_installation |
Now Log in to your MySQL server instance:
| sudo mysql -u root -p |
Enter your MariaDB root password and press Enter. Create a database and user for PrestaShop:
| CREATE DATABASE prestashop;
CREATE USER 'ps_user'@'localhost' IDENTIFIED BY 'password'; |
Next, execute the below command:
| GRANT ALL ON prestashop.* TO 'ps_user'@'localhost';
FLUSH PRIVILEGES; EXIT; |
Step 6: Download PrestaShop Software
Replace the password with a strong password. Your system is now ready for PrestaShop Ubuntu installation:
| cd /var/www/html
sudo wget https://assets.prestashop3.com/dst/edition/corporate/8.1.7/prestashop |
Next, you need to extract the content of the zipped file using the unzip command:
Step 7: Install PrestaShop
Next, launch your domain associated with the PrestaShop to install it:
Read and agree with the license agreement to proceed further:
Next, provide information regarding your store:
Finally, provide your site and database information and complete the process:
When you provide your admin username and password information you will see the Prestashop dashboard
