Performance parameters

This page combines many tools and tips that might help you improve your shop's performance server-wise – not sales-wise, although a server that performs well is able to serve more customers, and therefore make more sales.

Smarty

Smarty is the name of the template language used by PrestaShop's themes. You can learn more about it at http://www.smarty.net/.

There are two options:

Debug mode

New in 1.6.

When in debug mode, you can choose to lessen the impact of certain features on PrestaShop, in order to best pinpoint where an error comes from:

Optional features

Some PrestaShop features can be disabled if you do not use them, as they can slow down your shop.

If your catalog currently has products which make use of these features, then you will not be able to disable them. You will have to delete some data before you can turn them off.

You can disable the following features:

Combine, Compress and Cache (CCC)

CCC is a set of tools aimed at minimizing server load and theme loading time.

It does what it says: it combines textual files of the same type into one bigger file, which makes for fewer files to download; it then compresses the file using the common Zip algorithm, which makes for faster downloads; finally, it caches the compressed file, so that the server does not have to do this process every time a page is loaded, which relieves the burden on the server's processor.

Your theme must completely compatible with at least PrestaShop 1.4, otherwise CCC will not work as expected. This is why most options are disabled by default.

Media servers

This section enables you to redirect part of your traffic (image and video files, for instance) to other servers under your control, through other domains or sub-domains – most often, the files are hosted on a CDN (Content Delivery Network). By default, PrestaShop supports up to 3 media servers.

Putting your store's domain name in those fields is not the proper way to get fantastic performance. That being said, it is easy to set up a media server, and the benefits are real and almost immediate. Here is how:

  1. Open an account at a new host, preferably one who is specialist of distributed content. The most popular are Akamai (http://www.akamai.com/), Amazon (with its AWS services, among which is CloudFront: http://aws.amazon.com/) or CloudFlare (http://www.cloudflare.com/). You should also ask your own host, maybe it has a CDN service you can subscribe to.
  2. Copy your media files to that host's server. This means that the CDN server must contain an exact copy of the following folders from you store's main server: /img/themes and /modules.
    Reminder: you must make it so that these folders are always synchronized: even if you add new products or change your theme, the CDN server must contain the latest version of all these files.
  3. Once the CDN server is in place, add the web address (as given by your CDN host) in the first field, "Media server #1". If that host allows for more web addresses, add them.

In case you would rather that your files are still visually downloaded from your domain name rather that from an unknown domain name, follow this process:

  1. Create a subdomain for your store's domain name, for instance http://cdn1.example.com (the way to do that depend on your host, ask him about it).
  2. Put a .htaccess file at the root of the subdomain. That file should contain a single line:

    Redirect Permanent / http://cdn-adress.com


    Replace the http://cdn-adress.com with the one from your CDN server. This way, you are creating an automatic redirection from your subdomain to your CDN server.

  3. Once the subdomain is in place, add it in the first field, "Media server #1". If that host allows for more web addresses, create as many subdomains to your store's main domain name.

Even if you do not have a CDN server, you can use the media server feature to have the customer's browser download more files at a time, thus making the whole page loading process faster:

  1. Configure your web server to have virtual subdomains, such as images1.example.comimages2.example.com, and images3.example.com, pointing to PrestaShop's main folder.
  2. In your back office's Performance page, set each "Media server" field to these virtual subdomains.

Once this is in place, PrestaShop will load your images from either of these subdomains. In effect, images will come from the some folder (the main one), but the browser will open several more connection threads to your web server than it would by default, thus making the whole page load faster.

Ciphering

Ciphering means encrypting data so as to render it unreadable to unwanted eyes. Your costumers' account details, as well as your own, are protected by cyphering.

Here you can choose the algorithm you prefer:

Therefore, choose wisely. If you change this configuration, all cookies will be reset.

Caching

Your server's cache stores static versions of your dynamic web page, in order to serve these to your customers and thus reduce server load and compiling time.

Most of the time, you should first check with your web host about this setting, as it requires special settings on the server.

This section enables you to choose to enable caching, and then choose the caching method: