In this article, we'll help you setup the Stackpath SecureCDN 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 that you have already created a Site. If you didn't, you can find the tutorials on how to create one here:
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.
This tutorial assumes you've already gone through the steps to create a Site in your SecureCDN account.
Installation
- Login to the Stackpath Control Panel and copy the CDN URL of your site.
- 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 settings 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 and scroll down.
- 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.
6. 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 scroll down.
7. Scroll down to the section called Media Servers and a field called Media server #1. In that field paste your CDN URL. Other 2 fields can be used for subdomains. When you're done click save in the right bottom corner and scroll down.
If you completed all steps correctly your CDN should be implemented.