Shopware 6 is a powerful and customizable e-commerce platform that allows you to create modern online stores. In this guide, we will walk you through the process of installing Shopware 6 with NGINX and securing it using Let's Encrypt SSL on CentOS 8. If you're using a Windows VPS UK, the steps may differ slightly, but the overall process is similar. Shopware 6 is highly scalable, making it ideal for hosting on VPS UK Windows or any Windows Virtual Private Servers.

Prerequisites

Before we begin, ensure you have the following:

  • A CentOS 8 server with root access.
  • A registered domain name pointed to your server.
  • NGINX installed on your server.
  • PHP 7.4 or later with required extensions installed.
  • MySQL or MariaDB database server installed.

If you're using VPS UK Windows or Windows VPS Italy, ensure you have a similar environment setup to follow this guide.

Step 1: Update Your System

Start by updating your CentOS 8 system to ensure all packages are up to date:

sudo dnf update -y

Step 2: Install NGINX

To install NGINX on CentOS 8, use the following command:

sudo dnf install nginx -y

Start and enable NGINX:

sudo systemctl start nginx
sudo systemctl enable nginx

Step 3: Install PHP and Required Extensions

Shopware 6 requires PHP and several extensions. Install PHP 7.4 and the required extensions:

sudo dnf install php php-fpm php-mysqlnd php-json php-gd php-xml php-mbstring php-zip php-opcache php-intl -y

Start and enable PHP-FPM:

sudo systemctl start php-fpm
sudo systemctl enable php-fpm

Step 4: Install and Configure MySQL

Next, install MySQL to manage your Shopware 6 database:

sudo dnf install @mysql -y

Start and secure your MySQL installation:

sudo systemctl start mysqld
sudo mysql_secure_installation

Create a database and user for Shopware:

mysql -u root -p
CREATE DATABASE shopware;
CREATE USER 'shopwareuser'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON shopware.* TO 'shopwareuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 5: Download and Configure Shopware 6

Download the latest version of Shopware from the official website:

wget https://www.shopware.com/en/Download/redirect/version/sw6/file/install_v6.4.0.0.zip

Extract the files and move them to your web directory:

sudo unzip install_v6.4.0.0.zip -d /var/www/html/shopware

Set the appropriate permissions:

sudo chown -R nginx:nginx /var/www/html/shopware
sudo chmod -R 755 /var/www/html/shopware

Step 6: Configure NGINX for Shopware 6

Create a new NGINX configuration file for Shopware:

sudo nano /etc/nginx/conf.d/shopware.conf

Add the following configuration:

server {
    listen 80;
    server_name yourdomain.com;
    root /var/www/html/shopware/public;

    index index.php index.html index.htm;

    location / {
        try_files $uri /index.php$is_args$args;
    }

    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_pass unix:/var/run/php-fpm/www.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.ht {
        deny all;
    }
}

Save and exit the file, then restart NGINX:

sudo systemctl restart nginx

Step 7: Install Let's Encrypt SSL

To secure your Shopware installation with SSL, install Certbot and Let's Encrypt:

sudo dnf install certbot python3-certbot-nginx -y

Obtain and install your SSL certificate:

sudo certbot --nginx -d yourdomain.com

Follow the prompts to complete the SSL installation, and Certbot will automatically configure NGINX to use HTTPS.

Step 8: Complete Shopware Installation

Open your browser and navigate to https://yourdomain.com to access the Shopware installation wizard. Follow the on-screen instructions to configure the database and complete the setup.

Benefits of Hosting Shopware 6 on a VPS

Hosting Shopware 6 on a Windows VPS or a virtual private server hosting Windows ensures better performance and scalability for your online store. Whether you're using a UK Windows VPS or a Windows VPS Italy, hosting on Windows Virtual Private Servers provides dedicated resources that can handle high traffic and ensure optimal performance for your Shopware store.

Consider using Windows Virtual Dedicated Server Hosting for enhanced control and reliability when managing a large-scale e-commerce platform like Shopware 6.

Conclusion

By following this guide, you can successfully install Shopware 6 with NGINX and Let's Encrypt SSL on CentOS 8. This setup ensures that your online store is secure and performs optimally. If you're looking for scalable hosting solutions, consider Windows VPS Hosting UK to benefit from reliable, high-performance VPS hosting for your e-commerce website.

© 2024 VPS Hosting Solutions

¿Fue útil la respuesta? 0 Los Usuarios han Encontrado Esto Útil (0 Votos)