The speed of a shop, alongside user guidance and styling, is a decisive factor for many customers when deciding whether or not to place an order with you. A shop where customers have to wait 20–30 seconds before they can see the next page will have a hard time being successful. Many customers will abandon their purchase in frustration before completing their order because they are (rightly) unwilling to wait minutes for the product details or checkout to load. That is why it is important to keep waiting times as short as possible. Today, I will show you how to achieve this.
In addition to the basic measures, such as using up-to-date PHP and MySQL versions, you should be aware that during development the shop is effectively in a kind of maintenance mode, which has a significant impact on performance. To get the shop into a more performant state, the following steps should be carried out:
- Enable production mode
To enable production mode, go to the Shopware backend and select
Caches/ Performance > Caches Performance
In the new window, you can then select
“Use shop in production mode”
and confirm the selection.
- Run scripts using cron jobs
Another reason why the shop is slow initially is that every time a new page is accessed in your shop, all scripts have to be executed again.
To avoid this, you can have the scripts executed by cron jobs.
As before, go to
Caches/ Performance > Caches/ Performance Settings > General > Search
and select
Cronjob
as the “Update strategy”.
To ensure that the cron jobs can be executed automatically in the future, you need the following plugins:
Cron
and
CronRefresh
You can download these plugins using the Plugin Manager.
- Change theme settings
Compressing CSS and JavaScript files can provide a significant additional performance boost. To enable compression, go to:
Settings > Theme Manager > Settings
The new window now provides 4 options. By default, the following should be enabled:
Disable compiler caching
and
Create CSS source map
These two options should be disabled by clicking the checkboxes. Instead, enable
Compress CSS
and
Compress JavaScript
Once you have completed all of these steps, you should notice a significant improvement in performance.
