How to Install Shopware CE on Ubuntu 18.04

Install Shopware CE on Ubuntu

Shopware Community Edition is a free and open-source e-commerce application. As an alternative to another e-commerce application, like Magento, Shopware is a complete e-commerce solution – it is a very powerful and flexible application. Shopware is very easy-to-use, and we don’t need to master PHP in order to use it. The application is based on a number of symphony framework components developed in PhpStorm through the core features and its plugins. In this tutorial, we will show you how to install Shopware CE on a VPS running Ubuntu 18.04.

Prerequisites:

  • An Ubuntu 18.04 VPS
  • Apache with mod_rewrite enabled
  • SSH access with root privileges

1. Log in Via SSH and Update the System

Log in to your Ubuntu 18.04 VPS with SSH as a user with root access, or as the root user:

ssh root@IP_Address -p Port_number

Remember to replace “IP_Address” and “Port_number” with your server’s respective settings.

You can check whether you have the correct version of Ubuntu installed on your server with the following command:

lsb_release -a

You should get this output:

Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

Then, run the following command to make sure that all installed packages on the server are updated to the latest available version:

apt update && apt upgrade

2. Install the LAMP Stack

apt install lamp-server

Install these additional PHP modules:

apt install php7.2 php7.2-cli php7.2-fpm php7.2-curl php7.2-json php7.2-zip php7.2-gd php7.2-xml php7.2-mbstring php7.2-opcache unzip

At this point, the MySQL server is now running, and we can now create a password for the root user. Run the following command to create a root password, remove the test database, remove the anonymous user, and reload the privileges.

mysql_secure_installation

When prompted, answer the questions below by following the guide.

Enter current password for root (enter for none): Press [Enter] once (No password is currently set)
Set root password? [Y/n]: Y
New password: Enter a new password
Re-enter new password: Repeat the new password
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y

Once created, you can test the new password by invoking this command, where you will be asked for the password:

mysql -u root -p

3. Create a new database

Before installing Shopware Community Edition, we need to create a MySQL database. Let’s create one using the following commands:

mysql -u root -p

Let’s proceed with creating a database for Shopware CE.

mysql> create database shopwarece;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on shopwarece.* to shopwarece@localhost identified by 'm0d1fyth15';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit

Please change the password ‘m0d1fyth15’ above to your desired password.

4. Create Apache virtual host

nano /etc/apache2/site-available/yourdomain.com.conf
<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/html/shopwarece
ServerName yourdomain.com <Directory /var/www/html/shopwarece/> Options FollowSymlinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/shopwarece_error.log CustomLog ${APACHE_LOG_DIR}/shopwarece_access.log combined </VirtualHost>

Run the following commands to enable the new virtual host:

a2ensite yourdomain.com

systemctl reload apache2

Additionally, Shopware requires mod_rewrite to be enabled. We can run the following commands to enable it:

a2enmod rewrite

systemctl restart apache2

5. Install Shopware CE

We need to download the installation package from Shopware’s official page at this link. However, we made it easy for you to download Shopware – the command below will download it for you. But, it’s possible that the link will stop working after some time, or the version will become outdated with time. If you encounter an issue when invoking the wget command below, you will need to go to their official download page for the link.

mkdir /var/www/html/shopwarece

cd /var/www/html/shopwarece
wget https://releases.shopware.com/install_5.5.7_f785facc70e39f2ca4292e78739457417f19fbcf.zip?_ga=2.110917381.1678735926.1552879434-1860898197.1552787146 -O shopware.zip

Now, let’s extract the downloaded file, then change its permissions.

unzip shopware.zip

chown -R www-data: /var/www/html/shopwarece

To proceed with the installation, go to yourdomain.com using your favorite web browser.

Follow the installation – at the database configuration step, don’t forget to fill the correct database username and password that you created earlier.

Click on the blue “Start installation” button to start the installation. And, in the next step you will be asked to choose whether to install Community, Professional, or Enterprise Edition. Choose Community Edition to proceed.

 

If everything is okay, you will see the installation complete message, as shown below.

Need a fast and easy fix?
✔ Unlimited Managed Support
✔ Supports Your Software
✔ 2 CPU Cores
✔ 2 GB RAM
✔ 50 GB PCIe4 NVMe Disk
✔ 1854 GeekBench Score
✔ Unmetered Data Transfer
NVME 2 VPS

Now just $43 .99
/mo

GET YOUR VPS

Once finished, you can go to yourdomain.com/backend and log in with the username and password that you created during the installation.

 

Once logged in, you will be brought to the first run wizard page – please follow the steps. Here, you can install sample data as well as install PayPal as a payment method.

6. Install SSL Certificate

This is an optional step – please follow this step if you want to install a free SSL certificate from Let’s Encrypt on your domain.

apt install python3-certbot-apache

Once installed, run the following command to install an SSL certificate. You will be asked a few questions to help configure it properly. You don’t have to create a new Apache virtual host – certbot will configure it for you.

certbot

Congratulations! At this point, you should be able to access Shopware CE at https://yourdomain.com. For more information about Shopware CE, its features, and its configuration, please check their official documentation.


Of course, you don’t have to know how to install Shopware CE on Ubuntu 18.04 if you have an Ubuntu 18.04 VPS hosted with us. You can simply ask our support team to install Shopware CE on Ubuntu 18.04 for you. They are available 24/7, and will be able to help you with the installation of Shopware CE on Ubuntu 18.04.

PS. If you enjoyed reading this blog post on how to install Shopware CE on Ubuntu 18.04, feel free to share it on social networks using the shortcuts below, or simply leave a comment in the comments section. Thank you.

Leave a Comment