Shopware Performance Guide for Professionals
In this Shopware Performance Guide, we would like to give you tips that we have found out through years of working with Shopware and numerous projects. We have not yet been able to find these tips anywhere, but we would like to present them to you, as they can save you a lot of work and trouble in everyday life. First, however, we will briefly go into tips that are already known on the Internet, but you may not have encountered yet. So you have all the tips around the Shopware performance optimization collected in one place and can finally improve the speed of your online store.
- General performance tips from the Shopware world
- Performance tips for experienced store owners and developers
First of all, here are a few tips that are already generally known if you are looking for Shopware performance tips. Of course, you should also follow these tips to quickly improve the performance of your online store. If these tips and tricks do not provide you with a satisfactory result, you will find our Shopware performance tips for professionals later in the article. The implementation of the individual points is partly technologically demanding, here it might make sense to contact a professional Shopware agency.
Our Shopware performance tips and tricks:
- Upgrade PHP version to PHP7+: The speed of the online store is also always very much related to the PHP version used. So you should always find out with which new version Shopware is compatible by now. For example, upgrading from PHP version 7.0 to 7.2 can account for speed improvements of 10 to 15%.
- A powerful web server: Our web server recommendation for Shopware is nginx. Because the more visitors use your Shopware online store at the same time, the more power the web server needs to serve all requests simultaneously and quickly.
- Latest Shopware version: To ensure smooth functionality and performance, the use of the latest Shopware version is of course mandatory.
- Increase HttpCache retention time: By increasing the HttpCache retention time settings in the backend, you can also enable faster loading times for your Shopware store.
- More filters, fewer categories: For better load times, you should sort the listings of your products by fewer categories and include all the more filters so that your customers can still find the products they are looking for.
- Compress CSS and JS files: The more complex your files are, the longer it will take for your store to load for your store visitors. For this reason, you should compress the CSS files and JS files.
- Enable cronjobs: In the basic settings of the Shopware store backend you can enable cronjobs for search, SEO, topseller and referral marketing.
- Compressed images: For better page speed, you should also compress your images. By the way, a suitable image format for this is webp.
- Use a content delivery network (CDN): Depending on how many product images and other images you use in your webshop, it is probably worthwhile to use a content delivery network. This means a server that has a distributed network and can thus provide image requests or general data requests reliably and quickly. Because a local server is usually always active for the user, loading times are very short.
- Compress data volumes with the GZIP module: Another measure is to use the GZIP module with your web server. You can easily activate this to compress large amounts of data and make the Shopware store performance even better.
- A CacheWarmUp for the Shopware Shop: With special plugins for your Shopware online store, you can "warm up" your cache every night. This has the effect that after clearing the cache, your store still responds as quickly as if the store had already been visited.
Now we come to the Shopware performance tips and tricks that are for the professionals. If you are experienced Shopware developer or store owner, these advices will help you to improve your performance and save time you don't have to spend on hair pulling. In the last years we could learn a lot about performance, because we intensively supported different Shopware online stores. Now we would like to share our knowledge with you:
Through Tideways we had the opportunity to identify extremely slow page views of online stores with Shopware 5. The cause was a problem with Shopware's "new" HTML minifier. As some forum users also describe in the Shopware forum, a regex is used, which turns out to be extremely imperformant in certain constellations. Shopware has now fortunately reacted, so that the function, which can be found in the backend under Performance > Settings > General > Miscellaneous, is inactive by default since 5.6.7.
- Solution A: Performance > Settings > General > Miscellaneous -> Enable HTML compression -> no
- Solution B: Change the regex function according to the tips in the Shopware Forum. Click here for the article.
Meanwhile there are some reports about performance problems on systems with activated open_basedir. Also we could prove by measurements with Tideways in some of our stores that 50% of the loading times (TTFB) are only used for file I/O. And this for standard calls in the area of file operations like file_exists(). This is due to a bug in PHP.*
We could establish two solutions for this:
- Solution A: Disable "open_basedir". But you should first read what open_basedir is for, e.g. here https://stackoverflow.com/questions/3211612/what-is-the-use-of-open-basedir-in-php-and-how-does-it-work/3211621#3211621.
- Solution B: /engine/Shopware/Kernel.php, line 547, //always check for file modified time -> set to false. This is where all our stores with the issue incurred the highest cost for I/O.
Tideways is a tool for monitoring, profiling and tracking in PHP. It analyzes server-side PHP processes and can analyze individual pages as well as your entire online store.
For us, Tideways has become an indispensable tool to ensure that our stores run continuously fast. Tideways informs you about errors that occur in the store (which you probably don't notice, but your customers do), about slow pages in your store and about downtimes. Profiling and tracking extremely helps technicians isolate problem spots and minimizes the time between occurrence and fixing of a problem.
Need help setting up or using Tideways? Feel free to contact us.
A good hoster will provide you with a config already optimized for Shopware.
AMP or Accelerated Mobile Pages is a tool that arose from a collaboration between Google and Twitter. AMP is also an open source project and is designed to help you optimize your mobile content and websites, make them faster and thus create a better user experience. AMP opens a page in two steps - immediately after the click, the parts of the website that are important for the user become visible, then the rest of the page is loaded unnoticed. This keeps the amount of data low to begin with and improves the loading time of the website on the mobile device. Since research from Google shows that the bounce rate of users increases up to 58% if the website takes too long to load, AMP is the perfect tool to prevent this and improve your pageviews.
There are already ready-made plugins in the Shopware Store.
Elasticsearch is perfect for online stores that have an extensive product range with several thousand items. Search queries on classic MySQL databases can become really sluggish here, which significantly affects the user experience and is thus reflected in the conversion. Even with millions of articles or a high volume of visitors, a search implemented via ES is usually extremely fast and scales well.
If you want to know more about Elasticsearch and Shopware, you can find more information in the Shopware Docs.
Redis is characterized by a very simple data storage in the form of an extremely efficient key value store. Not only large online stores should always focus on maximum performance. Here Redis offers stability, scalability and the necessary performance.
In Shopware online stores, the application cache and an additional model cache can be made available more performantly with Redis. In addition, the sessions can be stored in Redis, which makes absolute sense, since these are otherwise relatively inperformant stored in the MySQL database. The installation can easily be done via config.php. Many established hosters offer suitable hosting including Redis.
It is easy to see that the topics are not easy to implement even for experienced developers. The EXWE Shopware Agency Team will be happy to help you with all questions regarding e-commerce and increase the success of your business with targeted support.
* Source: https://bugs.php.net/bug.php?id=77406
Was ist dein Projekt? Wenn du uns darüber erzählen möchtest, rufen wir dich zurück!
How you can set up target plans for your online store with Google Analytics and how you can connect Google Analytics with Shopware, you can find out here.
What are dynamic product groups in Shopware and what can they be used for? And how can you create them? You can find out all this in our article.
Use our Shopware tip on the topic: Shopware - All for PayPal obligatory states in a SQL. Use the SQL query in our blog article.