PrestaShop is a powerful open-source e-commerce platform that allows you to create a fully customizable online store. In this tutorial, we will guide you through the process of installing PrestaShop with Apache and securing it with Let's Encrypt SSL on CentOS 8. Whether you're hosting your website on a Linux server or a Windows VPS UK, the steps below will help you get started.
Prerequisites
Before we begin, ensure that you have the following:
- A CentOS 8 server with root access.
- A registered domain name.
- Apache web server installed.
- Access to Let's Encrypt for SSL certificates.
For those who prefer hosting on VPS UK Windows servers, the process will be similar but adjusted for the Windows environment.
Step 1: Update Your System
Before installing any software, it's important to ensure that your server is up to date. Run the following commands:
sudo dnf update -y
Step 2: Install Apache Web Server
Next, you'll need to install Apache. Use the following command:
sudo dnf install httpd -y
Once Apache is installed, start and enable the service:
sudo systemctl start httpd
sudo systemctl enable httpd
Step 3: Install PHP and Required Extensions
PrestaShop requires PHP to function. Install PHP and necessary extensions with the following command:
sudo dnf install php php-cli php-mysqlnd php-gd php-json php-curl php-zip php-xml php-mbstring -y
Step 4: Install MariaDB (MySQL)
PrestaShop also requires a database to store information. Install MariaDB with the following command:
sudo dnf install mariadb-server -y
Start and enable MariaDB:
sudo systemctl start mariadb
sudo systemctl enable mariadb
Secure your MariaDB installation by running:
sudo mysql_secure_installation
Step 5: Download PrestaShop
Download the latest version of PrestaShop from the official website:
wget https://download.prestashop.com/download/releases/prestashop_1.7.x.zip
Extract the files and move them to the Apache web root directory:
unzip prestashop_1.7.x.zip -d /var/www/html
Step 6: Configure Apache for PrestaShop
Create a new virtual host file for PrestaShop:
sudo nano /etc/httpd/conf.d/prestashop.conf
Add the following configuration:
<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/html/prestashop
<Directory /var/www/html/prestashop>
AllowOverride All
</Directory>
ErrorLog /var/log/httpd/prestashop_error.log
CustomLog /var/log/httpd/prestashop_access.log combined
</VirtualHost>
Save the file and restart Apache:
sudo systemctl restart httpd
Step 7: Install Let's Encrypt SSL
Secure your PrestaShop installation with Let's Encrypt SSL. First, install Certbot:
sudo dnf install certbot python3-certbot-apache -y
Now, obtain and install your SSL certificate:
sudo certbot --apache -d yourdomain.com
Follow the prompts to complete the SSL installation. Certbot will automatically configure your Apache server for SSL.
Step 8: Complete PrestaShop Installation
Open your browser and navigate to http://yourdomain.com
to access the PrestaShop installation wizard. Follow the instructions to complete the setup process.
Benefits of Hosting on VPS
Using a Windows VPS or virtual private server hosting Windows ensures better performance for your PrestaShop store. With Windows VPS hosting UK or VPS UK Windows solutions, you get dedicated resources that improve your site’s speed and reliability.
Hosting PrestaShop on a Windows Server VPS gives you flexibility, and Windows VPS Italy or UK options can cater to both European and international customers.
Conclusion
PrestaShop is a powerful tool for e-commerce, and hosting it securely with Let's Encrypt SSL ensures the best experience for your customers. Whether you're using CentOS 8 or a UK Windows VPS, following the steps above will help you get your store up and running smoothly.
For reliable and scalable hosting, consider Windows Virtual Private Servers or Windows Virtual Dedicated Server Hosting for your online business needs.