Do you want to develop a webshop using the same platform as some more well-known brands? With this article, you will soon be standing on the shoulders of giants on a top-notch platform!
This article will show you how to easily install a Shopware 6 webshop on a Tilaa Cloud VPS using a LAMP stack.
Step 1 – Setting up the VPS
The first step that we will take is setting up the VPS, you can do this on your own MyTilaa Dashboard using the logon information that you’ve selected while making your account.
In the MyTilaa dashboard, select the Add VPS-button on the top right corner of your screen. Which will bring you to the Tilaa Configurator.
For this guide, we will be using the Standard Package; however, if you think you might need a bit more power to build the webshop of your dreams, you could also choose Professional.
Click Next step to be brought to the selection of our Appliances, Operating Systems and Control panels.
Here, select the Appliance button and look for the LAMP button and once again select Next Step. In the following panel, give your VPS a name that you would like to use.
Finish the process by checking out; you can skip selecting the DNS name and location.
In your MyTilaa dashboard, click on the Details button in the VPS panel and look for the newly added VPS.
Click the number before the name to open the VPS details and select Open video display.
Step 2 – Configuring your VPS
In the video display you will be shown important details surrounding various of the LAMP stack.
Take note of the Webmin address and use your web browser to navigate to it. It will notify you that your connection is not secure. Navigate to the site anyway and sign in with the root credentials found on MyTilaa's VPS details page.
Enter to exit this menu and log in with the root credentials found above the video display and in the VPS dashboard. In the VPS console, type
apt dist-upgrade -y
When the system asks to keep configuration, just press enter to confirm the default option.
Installing PHP 8.1
After installing all updates, you'll need to install php7.4; unfortunately, this isn't available in Debian 10's repositories. You must manually add the repository using the following commands:
apt -y install lsb-release apt-transport-https ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
Add the repo by executing running nano on /etc/apt/sources.list.d/php.list and adding the following line: "deb https://packages.sury.org/php/ buster main" and making sure you save the file.
Then once again run
apt dist-upgrade -y
to update php to the latest version.
Before you can continue, you will need to make sure that the webserver knows where to find the files for the actual webshop. To nagivate to the configuration, please click the Servers bar in the navigation and select Apache Webserver.
By default, you will be placed in the Existing Virtual Host page in which a few are already predefined. Select all with the exception of Adminer and remove these using the Deleted Selected Servers button.
Continue by selecting Create Virtual Host.
At the “Handle connections to address” select Specific address and type the name your website will use.
Please note: this must be registered in your domain.
Leave the port set to default, under document root type in the location where you will store the files. In the example we will use /var/www/shopware/public/ and make sure to tick the “Allow Access to this directory” button.
For servername, you can either leave it set to automatic or give the virtual host a specific name. We suggest using kb-shopware.tilaa.cloud
Setting a specific name will make identifying multiple sites easier, however this example will use automatic as we will create only one.
💡 Tip: Leave the other settings as they are for ease. For more complex setups you might want to choose to adjust those settings to match.
Click the green Create now button to finish setting up the Virtual Host.
After this, click on Global Configuration and click on Configure Apache Modules in this list look for php8.1 and toggle the tick button; disable php7.3.
Unrelated to PHP also enable the rewrite module on this page. If you don’t activate it, Shopware will not function correctly.
Click on the green Enable selected modules button after you’ve these modules to activate the plugins.
Configuring other pre-requisites
Shopware 6 requires some packages in order for it to run. To install these, we will return to the shell that we’ve used to configure php8.1 and use the following command:
Apt install -y php8.1-zip php8.1-curl php8.1-intl php8.1-mbstring php8.1-gd
Besides the packages, Shopware 6 recommends a few changes in configuration of PHP8 which will increase the maximum memory PHP can use and the maximum size of files uploaded through the application from 2MB to 6MB.
To do so open /etc/php/8.1/apache2/php.ini using your preferred text editor.
When in the file start by finding the string max_execution_time and change the value 30 to 120 then look for memory_limit and change the value of 128M to 512M.
Lastly look for the last configuration key by looking for upload_max_filesize and change it’s value from 2M to 6M.
Save the file and restart Apache using systemctl restart apache2 to make the changes effective.
Downloading and uploading Shopware
Now you can go to the downloads page of Shopware. We will be using the community edition. Hit the Download button from the Shopware button to download the zip file.
Return to the Webmin and go to tools and select File Manager.
In the file manager, you can click around to navigate the files on your server. We, however, are interested in the /var/www/shopware folder that was created by Webmin for the webshop.
When you have entered the folder, click on File and select Upload to current directory you will see a pop-up menu; here you can either drag and drop the zip file or you can upload it by clicking in the blank box and navigate to where you saved the zip file and upload it.
Select the 3 dots next to the file name and select the extract button. The Shopware files will appear. After this happens, select the box near the original zip file and click the red trashbin to remove the original zip file.
Apache will not be able to access these files as they are owned by root. Select all files and select tools, in that menu click change ownership.
In this pop-up window, type in www-data in both fields and select the box next to recursive and click the blue change button.
Now the files exist and you have the right permissions, you need to return to the Apache configuration. Open the virtual host you created in the step before and adjust the Document Root to /var/www/shopware/public/ then click Save. Then click the Edit Directives button and append the file to look like the one below.
And once again finish by clicking the green save button. Don’t forget to restart the webserver by clicking the restart button in the right upper corner of your screen.
We will now continue with the MySQL configuration by selecting the Servers tab and selecting the MySQL Database Server menu-item.
It is possible that the MySQL service isn’t running when you select the panel. You can then start it by selecting the Start MySQL Server.
Look for the User permissions button and select it.
Here select the Create new user button.
In the next menu, start by selecting the button Next to the blank box next to “Anonymous User” and type in “shopware_db” (or another username).
At Password, select the key-button and select the eye to view your password. Note this down as we need this in the next step. Click the button next to the blank box near “Host” and type “localhost” in this box, then give the user the first 6 permissions; when you’ve done this click the yellow Create button.
Back on the User overview select Save. You will then return back to the MySQL Database Server menu; find and select the Create a new database button.
In the next menu; we will create a new database that Shopware will use to store its information. For ease, we will name the database shopware, but you can use any you would like.
Leave the rest of the values to default; as the Shopware wizard will handle these settings itself and click the yellow Create button.
Once back in the MySQL server menu, select the Database Permissions button; it should return an empty list.
Select the Create new database permissions.
At the database section, set the radiobox next to selected and type the name of the database; if you followed the guide this will be “shopware”, select the Radio button next to the blank box at “Username” and type in the username that you set in the previous step, once again, if you followed the guide, it will be shopware_db.
With Hosts select the button next to the blank box and type in “localhost” and finally select all the permissions before hitting the yellow “Create” button.
Now, you can navigate to the URL that you’ve configured and you will be greeted by the Shopware 6 wizard; start by selecting your language and clicking Next.
If you have followed the guide correctly, the next screen will show you that the system is ready to be installed. Once again click Next.
Make sure to agree to the EULA provided by Shopware and continue to the database configuration step.
For Shopware 6 to run, you will need to provide it with the database that we’ve created.
Here we will give the variables to the SQL server running in our LAMP-stack.
- For the host, use localhost, as the service is running on the same server
- For the user, use the shopware_db user that we’ve created and give the password that you’ve generated for that user in the password field.
- At the database name field type in shopware.
Click the blue Start installation button and wait for Shopware 6 to create the database tables and fields. When it’s finished, click Next to continue before finishing the configuration of your shop.
When you are finished and ready to launch your webshop, click the blue Next button to finalize the configuration.
Step 4 - Shopware has been successfully installed!
You've completed the installation of Shopware! You can now build and launch your website. Shopware is easy to use and provides a lot of information. Best wishes. We wish you much success with your webshop.
We also wrote an article on how to properly secure Webmin.