When setting up Speed Kit through our installation wizard you will be asked to copy the service worker ("sw.js") as well as a code snippet into your site. This article explains where Magento users have to paste these two files.
First, you have to be logged into your Plesk account.
To save the Service Worker (sw.js), navigate to:
Domains -> Your Domain -> File Manager -> [your root directory] (usually "httpdocs")
... and save the file there.
To save the code snippet, in your Magento backend, follow these steps from the Magento Documentation and paste the snippet into the "Scripts and Style Sheets" section:
- Press "Configure Now" in order to open our Installation Wizard.
- Download the Speed Kit Service Worker and upload it to the root directory of your website
- Back in the Installation Wizard in the 3rd step, select "My site is not static" as you have a shop
- In the 4th step press "Copy to clipboard" in the in order to copy your Speed Kit config
- Navigate to your Magento Admin Dashboard
- On the Admin sidebar, go to Content > Design > Configuration.
- Find the store view that you want to configure. Then, click Edit in the Action column.
- Under Other Settings, expand the HTML Head section.
- Under Scripts and Style Sheets paste the snippet from step 4 of the Installation Wizard
- In the blacklist-part of the configuration, add the following line under url:
This ensures that your Magento Admin Dashboard is excluded from caching as it is now blacklisted.
- Hit the orange "Save Configuration" button in order to save your settings.
- In Magento's Cache Management press the orange "Flush the Magento Cache" button.
- Return to our Plesk extension and select "Rerun Speed Test" for the website in question
- Now your website is up and running with Speed Kit