In this article, we'll help you setup the Stackpath CDN with a website on Prestashop 1.7. If your website is using an older iteration of Prestashop, please refer to this tutorial. This tutorial assumes a StackPath Site is created.
This article will walk you through how to perform a static assets integration, which does not support the use of the StackPath Web Application Firewall (WAF). If you’re looking to maximize security by using our CDN with the WAF, please refer to the CDN & WAF integration guide.
Before you begin, we highly recommend you test the performance of your site using Google Page Speed or Pingdom Tools. You can test your site now and after setting up the plugin for a before and after performance comparison.
Installation
- Login to the Stackpath Portal, open your Site and copy the Edge Address.
- Log in to your PrestaShop admin panel. You can access the admin panel by typing domain.com/admin in your browser.
- In the admin panel on the right side menu select Advanced Parameters and in expanding menu select Performance.
- The first setting to adjust is Smarty. Smarty is the name of the template language used by PrestaShop's themes. For best optimization, you should set Template compilation to Recompile templates if the files have been updated. By making this change PrestaShop will cache your HTML, but it will check for updates. If your theme gets an update, PrestaShop will update your theme and cache new version of it.
- The cache should be turned on and caching type should be set on File System. Also, it's good practice to set the cache to be cleared every time something is modified. When you're finished click the save button in the right bottom corner and scroll down.
- The cache should be turned on and caching type should be set on File System. Also, it's good practice to set the cache to be cleared every time something is modified. When you're finished click the save button in the right bottom corner and scroll down.
- Next are the Debug mode settings. Those settings are used for testing, and we recommend you to let someone with technical skills set them. For setting CDN you should disable all three options. Click save in right bottom corner.
- Scroll to the Optional Features >> Combinations. Product combinations enable you to have a whole product line out of a single product: varying size, colors, capacity, etc.
- Features. Product features enable you to indicate the product-specific information: weight, material, country of origin, etc.
- Customer groups. Customer groups enable you to group customers in order to give them certain privileges and restrictions: discount, module restrictions, etc.
Those options won't affect CDN performance so you can set them as you wish. Click save in right bottom corner and scroll down.
7. Next set of settings is called CCC( Combine, Compress, and Cache). This is settings for compression of CSS and javascript. Also, you can turn on Apache optimization, if you do that it will add a directive in your .htaccess file, which should improve caching and compression. When you set it - click save in right bottom corner and.
8. Scroll down to the section called Media Servers and a field called Media server #1. In that field paste your Edge Address. Other 2 fields can be used for custom subdomains if you have any. When you're done click save in the right bottom corner.