PrestaShop is a powerful, open-source e-commerce platform used to build and manage online stores. In this guide, we will walk you through the steps to install PrestaShop on Rocky Linux 9. Hosting PrestaShop on a WindowsVPS ensures optimal performance and scalability, offering the dedicated resources of a VPS server to handle your e-commerce needs.

Step 1: Update Your VPS Server

Before starting the installation process, ensure that your VPS server is up to date by running the following commands:

sudo dnf update -y

Running PrestaShop on a WindowsVPS ensures that your store can handle high traffic, process transactions smoothly, and scale as your business grows.

Step 2: Install Apache, MariaDB, and PHP (LAMP Stack)

PrestaShop requires a web server, a database, and PHP to run. Install the LAMP stack (Linux, Apache, MariaDB, PHP) by running the following command:

sudo dnf install httpd mariadb-server mariadb php php-mysqlnd php-json php-gd php-zip php-xml php-mbstring -y

Once installed, start and enable Apache and MariaDB:


sudo systemctl start httpd
sudo systemctl enable httpd
sudo systemctl start mariadb
sudo systemctl enable mariadb

Step 3: Secure MariaDB

Secure your MariaDB installation by running the following command:

sudo mysql_secure_installation

Follow the prompts to set a root password and remove unnecessary defaults for security purposes.

Step 4: Create a Database for PrestaShop

Log in to MariaDB to create a database for PrestaShop:

sudo mysql -u root -p

Run the following commands to create a database and user for PrestaShop:


CREATE DATABASE prestashop;
CREATE USER 'prestashopuser'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON prestashop.* TO 'prestashopuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Remember to replace your_password with a strong password of your choice.

Step 5: Install PHP Extensions and Configure PHP

Ensure all required PHP extensions are installed. Run the following command to install additional extensions:

sudo dnf install php-intl php-curl php-zip -y

After installing the extensions, open the PHP configuration file to modify the memory limit and file upload size:

sudo nano /etc/php.ini

Update the following settings:


memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M

Save and close the file, then restart Apache:

sudo systemctl restart httpd

Step 6: Download and Install PrestaShop

Navigate to the web root directory and download the latest version of PrestaShop:


cd /var/www/html
sudo wget https://download.prestashop.com/download/releases/prestashop_1.7.8.5.zip

Extract the PrestaShop files:

sudo unzip prestashop_1.7.8.5.zip

Move the extracted files to a prestashop directory and set the correct permissions:


sudo mv prestashop /var/www/html/prestashop
sudo chown -R apache:apache /var/www/html/prestashop
sudo chmod -R 755 /var/www/html/prestashop

Step 7: Configure Apache for PrestaShop

Create a new Apache virtual host file for PrestaShop:

sudo nano /etc/httpd/conf.d/prestashop.conf

Add the following configuration (replace your-domain.com with your actual domain or server IP):



    ServerAdmin admin@your-domain.com
    DocumentRoot /var/www/html/prestashop/
    ServerName your-domain.com

    
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

Save the file and enable the new virtual host:

sudo systemctl restart httpd

Step 8: Complete the PrestaShop Installation via Web Browser

Now that the server is configured, open your web browser and go to http://your-domain.com (or use your server’s IP). Follow the PrestaShop installation wizard to complete the setup.

During installation, you will be asked to provide the database credentials you created earlier (database name: prestashop, username: prestashopuser, password: your_password).

Step 9: Remove the Install Folder

After completing the installation, for security reasons, delete the install folder by running:

sudo rm -rf /var/www/html/prestashop/install

Step 10: Optimize Your VPS Server for PrestaShop

Running PrestaShop on a WindowsVPS allows you to benefit from dedicated CPU, memory, and storage resources. A VPS server ensures better performance and scalability for your e-commerce platform, especially as your traffic and transactions grow. VPS hosting also provides flexibility to scale your server resources as your business expands, ensuring a smooth shopping experience for your customers.

Conclusion

By following this guide, you have successfully installed PrestaShop on Rocky Linux 9. PrestaShop is a powerful platform for building and managing online stores, and hosting it on a WindowsVPS ensures that your store can handle high traffic and growing business demands.

For more information about VPS hosting and optimizing your PrestaShop setup, visit WindowsVPS today.

© 2024 WindowsVPS - All Rights Reserved

Was dit antwoord nuttig? 0 gebruikers vonden dit artikel nuttig (0 Stemmen)