Factors for the correct optimisation of a shop with Prestashop

0. General introduction to the manual

This manual is designed to offer a detailed guide to the configuration, optimisation and maintenance of a Prestashop-based online shop, using servers administered with SWPanel.

Purpose of the manual

The main objective is to help the reader understand the technical and functional aspects that directly affect the performance of their online shop. Each section includes detailed information on the factors that influence loading speed, system stability, security and user experience. In addition, it includes best practices and specific recommendations to improve the operational efficiency and SEO positioning of e-commerce.

Topics covered

This manual covers the following key topics:

  • Web Hosting Server: Explains the appropriate choice of hosting type (shared or Cloud), the necessary resources (CPU, RAM, storage) and the configuration parameters (Apache, Nginx, PHP).

  • Database: Describes the optimal settings for the database engine (MariaDB), as well as maintenance and cleaning tasks to ensure its efficiency.

  • Prestashop Application: Provides details on the configuration of the Smarty system, CCC (Combination, Compression and Cache), module management and platform updates.

  • Web Images: Provides recommendations for image optimisation to improve website loading times and SEO.

Basic concepts

Below, we define some concepts that will be used throughout the manual and that are fundamental to its understanding:

  • Prestashop: Content management system (CMS) specialised in the creation and management of online stores.

  • SWPanel: Comprehensive Cloud server management platform, which allows you to configure and monitor hosting services in a simple and efficient way.

  • Cloud Server: Virtual hosting environment offering dedicated and scalable resources for hosting web applications.

  • Smarty: Template engine used by Prestashop to generate the HTML content displayed to the user.

  • CCC: Compression and Caching. A set of techniques that reduce the size of web files and improve performance.

  • CDN (Content Delivery Network): A content distribution network that allows static resources (images, scripts, styles) to be delivered from geographically distributed servers to improve loading speed.

1. Web Hosting Server

The web server is one of the most important factors when it comes to guaranteeing the proper functioning and optimisation of your online shop with Prestashop. A quality server with high availability of resources (vCores, RAM and HD) will result in faster data processing to meet visitor requests. In this way, the speed of loading the website, displaying the content in the browser and the agility in the process of responding to database queries will be much faster and more efficient. In short, a server with good performance translates into better SEO results, avoids errors on our website, improves the user experience, thus increasing their confidence and therefore online sales.

1.1 Type of web server - (Shared / Cloud)

The website of an online store always demands more server resources than any other, such as a blog or a corporate website. In addition, the greater the volume of products in the online store or the number of visitors, the greater the demand for resources to respond quickly and efficiently to customer requests. For this reason, when choosing the type of web hosting for our online shop, we should take into account not only its current size, but also its future size, as one of the objectives of our e-commerce will be to increase the number of customers and sales. Currently, there are different types of hosting for an online shop, the most commonly used being the following:

a) Shared Server (Shared web hosting) - This is the cheapest hosting service as it is a server on which a multitude of websites are hosted that share the same resources (vCores, RAM and HD). The configuration parameters, corresponding to the server resources that the website can access and make use of, are always limited, so it is not always possible to adapt them to cover the configuration or performance requirements of the website. For this reason, this type of web hosting is recommended for relatively small shops, which do not have a large portfolio of products and have a low number of visitors/customers.

b) Cloud Server - This is a virtual server with high availability and guaranteed continuity of service, due to the redundancy of the infrastructure on which it is deployed and to which exclusive hardware resources (vCores, RAM, HD) are assigned, which can be scaled up at any time, making it possible to constantly adapt them to the growth needs of the online store. All the server's resources are fully available to the online shop, which means they can be completely assigned to the programming, configuration and e-commerce demand requirements. These types of Cloud servers involve a higher web hosting cost due to their higher performance and quality, so their use is recommended for online shops with a large portfolio of products, number of customers and sales.

1.2 Web server resources - (CPU / RAM / Disk)

a) CPU - Processor (vCores) - The higher the number and GHz power of the vCores assigned to the server, the better its response speed will be when executing the calculations necessary to attend to database queries, loading web content into RAM and subsequent display in the browser. In summary, a higher value in the number and speed of vCores assigned to the server translates into a better overall performance of our online store. When the number of vCores assigned to the server reaches more than 90% of its processing capacity, it begins to suffer from overload, which considerably reduces the loading speed of the online store. For this reason, the server must be provided with a sufficient number of vCores so that the sustained process load does not continuously exceed more than 60% or 70% of the server capacity, thus reserving a prudent margin in the processing capacity of the server of 30% or 40% to deal with occasional peaks and avoid process overloads that can cause the web to slow down or even stop responding. It is recommended that for a Prestashop store the Cloud server has a minimum of 4 vCores with speeds above 2 GHz.

b) RAM - RAM plays a crucial role in the performance of your online shop. It acts as a temporary storage space for the data that the processor needs in real time. When a visitor accesses your shop, the web server receives the request and the processor executes the calculations necessary to generate the content of the page. This content is transferred to the RAM, which in turn sends it to the visitor's browser for viewing.

If the amount of data generated by the processor exceeds the capacity of the RAM, the server becomes saturated and stops responding, interrupting your customers' shopping experience and negatively affecting your business.

Therefore, it is essential to correctly size the RAM of your Cloud server. As your shop receives more simultaneous visits, the demand for RAM increases. To ensure optimal performance, we recommend:

  • Provide enough RAM: Make sure your server has enough RAM to handle your shop's usual traffic.
  • Consider traffic spikes: Reserve an additional margin of RAM to absorb possible traffic spikes, such as promotions or advertising campaigns.
  • Recommendation for Prestashop: For online shops built with Prestashop, we suggest starting with a minimum of 4 GB of RAM, and increasing this amount as your shop grows.

By optimising your server's RAM, you ensure a smooth shopping experience for your customers, which translates into greater satisfaction and better results for your business.

c) Hard drive capacity and type - To optimise the performance of your online shop, we strongly recommend the use of SSDs. These drives offer significantly faster data read and write speeds than traditional hard drives, resulting in smoother and faster browsing for your customers.

Key benefits of SSDs:

  • Greater speed: Instant access to data, reducing page loading times.
  • Simultaneous access: Ability to handle multiple data requests at the same time, ideal for shops with a lot of traffic.
  • Superior efficiency: The SSD's built-in memory controller manages data intelligently, freeing the CPU from integrity control tasks.

In addition to speed, it is crucial to correctly size the storage space of your Cloud server. The disk must be large enough to accommodate the operating system, installed software, web content and your shop's database, which will grow as traffic increases.

Recommendations for Prestashop:

  • For a Cloud server with Linux, Apache/Nginx, MySQL/MariaDB and PHP, we recommend a minimum of 20 GB of disk space.
  • As your shop grows, consider increasing the storage space to ensure optimal performance.

By choosing SSDs and sizing the storage space correctly, you ensure an exceptional shopping experience for your customers, which translates into greater satisfaction and better results for your business.

d) Traffic limit. - When a visitor accesses your website, the server exchanges data with their browser to display the content. This exchange of data, known as traffic, has a size that providers tend to limit on a monthly basis.

What does the traffic limit imply?

The monthly traffic limit represents the total amount of data transferred between the server and your visitors‘ browsers during a month. Once this limit is reached, the server stops responding to new requests, making your website inaccessible.

Impact on your business:

An insufficient traffic limit can disrupt your customers’ experience and negatively affect your business.

Key recommendations:

  • Pay attention to traffic: When contracting a Cloud server, carefully check the monthly traffic limit.
  • Prioritise unlimited traffic: If your website receives a lot of traffic, consider choosing a provider that offers unlimited traffic.

By choosing a provider with an adequate traffic limit, or ideally, unlimited traffic, you guarantee that your website is always available to your customers, which translates into a better user experience and greater business opportunities.

In a SWPanel Cloud server you can adjust the assigned resources from the server administration Dashboard, as described in the following 📃 Manual: Increase and reduce my Cloud resources

1.3 Web server configuration parameters - (Apache / Nginx/ PHP)

Cloud SWPanel servers use Apache and Nginx web servers in tandem. Apache is configured to run behind Nginx, with Nginx acting as a reverse proxy. This configuration allows Nginx to efficiently handle static content requests, while Apache is in charge of managing dynamic requests, providing a balanced and efficient server configuration.

a) Apache web server configuration - The optimisation of the Apache web server for our Prestashop store can be done through the .htaccess file located in the root directory of our website. In this file we can define how the Apache web server will behave for such important tasks as using browser cache, increasing web security, protecting directories, etc., as well as optimising the processing and delivery of data by the browser, notably improving the performance of the server and the SEO positioning of our website.

  • Use of GZIP (the Gzip module needs to be installed on the Apache server) The following code enables the compression of the information delivered by the web server, so that the decrease in the size of the data decreases the bandwidth necessary to display the content of the online store, increasing the speed with which the web is loaded.
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_item_include file .html$
mod_gzip_item_include file .php$
mod_gzip_item_include file .css$
mod_gzip_item_include file .js$
mod_gzip_item_include mime ^application/javascript$
mod_gzip_item_include mime ^application/x-javascript$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include handler ^application/x-httpd-php
mod_gzip_item_exclude mime ^image/.*
</IfModule>
  • Activate the Keep Alive resource. Enabling Keep-Alive (Persistent Connection) can help optimise website performance and provide a better user experience. It allows the visitor's browser to reuse a single TCP connection to load the page content, thus reducing the number of HTTP requests needed to display each element of the web page.
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>
  • Define a cache duration value (The “max-age” data is expressed in seconds). The cache allows copies of the data necessary to display the web content to be stored in the visitor's browser, so that the first time the browser accesses the web, it saves a local copy of the data delivered by the server, which will be reused in subsequent requests to the same website and therefore will no longer be requested from the server, reducing the bandwidth needed to display the website content, reducing the consumption of server resources and improving the loading speed of our online shop.
<FilesMatch "\.(php|html|htm|txt|html5|jpg|png|js|css)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
# Disable the following parameters
<FilesMatch "\.(pl|cgi|spl|html)$">
Header unset Cache-Control
Header unset Expires
Header unset Last-Modified
FileETag None
Header unset ETag
Header unset Pragma
</FilesMatch>

b) Configuring the Nginx web server

The configuration of the Nginx server parameters for our online shop will be done from the Dashboard of our Hosting service with SWPanel.

  • Define a cache duration value . This indicates the period of time during which the cached data will be stored in the browser. The “Expires” data is expressed in days and we can indicate the default value which is 7 days. (7d)
7d
  • limit_req_zone. It allows us to define the number of HTTP/HTTPS requests that a user can make in a given period of time. It is usually used for security purposes to limit the response speed of the Nginx server and protect it against possible brute force or DDoS attacks, although increasing this value can improve the response speed of the Nginx server and the overall performance of our online store. We will define this parameter with a value of 300 per second.
$binary_remote_addr zone=swmanuales.com_rate:1m rate=300r/s
  • proxy_cache_path. This allows you to indicate the local directory of the server in which the cache data will be stored , as well as other parameters such as the maximum size of the server disk that will be used to save the data cached by Nginx. When the size of the cache reaches the limit, a process called the cache manager deletes the files that were used least recently so that the size of the cache returns to below the limit. We will define the value of this parameter as 67108864 (expressed in bytes).
/var/www/domain.com/cache levels=1:2 keys_zone=swmanuales.com_proxy:5m max_size=67108864

On a server managed with SWPanel you can adjust the values assigned to the Nginx parameters from the administration Dashboard of your hosting, as described in the following 📃 Manual: How to adjust the basic parameters of my hosting in a Cloud.

c) PHP parameters. The configuration of PHP parameters is one of the most important points when it comes to guaranteeing the correct functioning of the web server as well as avoiding its overload. In shared server web hosting services, these possible PHP configuration values are usually configured by default at low levels and cannot be freely increased to adapt them to the needs of our website. This is one of the reasons why we recommend hosting your online shop on a Cloud Server, as this type of hosting allows you to freely configure the PHP parameter values without any restrictions. PHP parameters can be configured through the SWPanel hosting control panel

The most important PHP parameter values to configure are:

  • max_execution_time: It establishes the maximum time in seconds that a script can be executed before it ends. We define it with a value of 300 seconds.
max_execution_time = 300
  • max_input_time: This establishes the maximum time in seconds that a script can analyse input data such as POST and GET. This is generally increased to allow for large file uploads. We set it to -1, which means that we apply the same limit value defined for the max_execution_time parameter.
max_input_time = -1
  • max_input_vars: It establishes the maximum limit of GET/POST/COOKIE variables that can be accepted during requests to the server. In the case of multilanguage online shops, a high value for this parameter allows the translations of the site into different languages to be displayed correctly. We will set the value to 2000.
max_input_vars = 20000
  • memory_limit: Set the maximum memory limit in MBytes that a script can assign. Websites that perform long or heavy processes will need a high memory limit value. Depending on the amount of RAM available on the server, the value can be increased proportionally. For a server with 4 GB of RAM, we would set a value of 512M
memory_limit = 512M
  • post_max_size: Set the maximum size allowed for POST requests. We will set a value of 32M
post_max_size = 32M
  • upload_max_size: Set the maximum size allowed for uploading files to the server. For example, from the website's contact form. The value set will be 32M
upload_max_size = 32M
  • allow_url_fopen: It allows PHP file functions to retrieve data from remote locations via FTP or HTTP. We recommend having this option enabled, as there are modules and add-ons that need to connect to external URLs to carry out their processes. We will set the value to 'on'
allow_url_fopen = on
  • pm.max_children Define the limit of PHP requests that are executed simultaneously for a particular hosting service. We set the value to 20.
pm.max_children = 20

On a server managed with SWPanel you can adjust the values assigned to the PHP parameters from the administration Dashboard of your hosting, as described in the following 📃 Manual: How to adjust the basic parameters of my hosting in a Cloud.

2. Database

The database in our Prestashop is responsible for storing the information in our shop, organised using tables, indexes and records. It is also responsible for managing queries and access to the information stored in the tables, as well as processing and administering their content. Good configuration and efficient maintenance of the database is essential to guarantee the optimal performance of our online shop with Prestashop.

2.1 Database server configuration

Any online shop constantly makes multiple simultaneous connections to the database to retrieve product data, prices, images, user sessions, etc. While a query to the database is being executed, for example about a product, a list of its characteristics, an image or video, ... the web remains inactive waiting for the data resulting from the query and once the database engine resolves this query the web displays the information to the user, so it is critical that the database structure and configuration is optimised to minimise the response time of the database engine, thus improving the loading speed of the web and the user experience.

In a SWPanel Cloud server, the configuration parameters of the MariaDB database engine can be modified from its administration Dashboard, where we will find the tool to modify the basic settings of the server.

a) Cache. Optimising database performance (DBPs) is just as crucial as optimising the static content of your website. Using a cache in the DBP allows you to store the results of frequent queries, preventing the server from having to execute them repeatedly.

Key benefits of database caching:

  • Reduced server load: By not having to repeat queries, the server is freed from unnecessary work.
  • Increased response speed: The pages of your Prestashop store load faster, improving the user experience.
  • Improved overall performance: An optimised database contributes to a smoother operation of your website.

Important considerations:

  • Increasing the size of the database cache implies greater RAM consumption.
  • It is essential to monitor resource consumption and adjust the server's RAM accordingly.
  • The more RAM you assign to the server, the higher the cache values you will be able to configure.

Recommendations for Prestashop:

  • Start with a moderate cache configuration and adjust it according to traffic and performance.
  • Monitor the server's RAM consumption and make sure you have enough capacity to handle the cache.
  • As your online shop grows, consider increasing the server's RAM space to ensure optimal performance.

By implementing an efficient caching strategy for your database, you can achieve a significant increase in the performance of your online store, which translates into a better experience for your customers and greater sales opportunities.

The recommended values for the MariaDB database engine parameters for a server with 4 GB of RAM are as follows:

  • query_cache_type: enable cache.
query_cache_type = ON
  • query_cache_limit: indicates the maximum size of results per query that can be cached, for each query how much of the total cache size are we allowing it to use at most.
query_cache_limit = 128K
  • query_cache_size: controls the total amount of memory we assign to the query cache, if we set it to 0 we will be disabling the cache.
query_cache_size = 32M
  • table_open_cache: indicates the number of tables that can be kept open in the cache.
table_open_cache = 1000
  • thread_cache_size: indicates how many new connections can use cache queries instead of executing the query on disk.
thread_cache_size = 80
  • host_cache_size: host number that we will cache.
host_cache_size=10000

b) Buffering. Buffering (memory space in which data is stored temporarily) is also part of the process of managing the cache of our database. The buffering values are used to adjust the parameters that work with the memory area that contains the cached data and that we have defined previously.

  • read_buffer_size: It establishes the size of the buffer for optimising the reading of data stored in the tables.
read_buffer_size = 2M
  • read_rnd_buffer_size: It establishes the size of the buffer for reading tables in Full Table Scan mode and the reading of ordered rows with the SORT command.
read_rnd_buffer_size = 1M
  • join_buffer_size: This is the maximum size of the buffer used for join queries that require the complete scanning of tables that do not use indexes.
join_buffer_size = 2M
  • sort_buffer_size = 2M: This is the maximum size of the buffer used to sort the results of the SORT command directly in the cache memory (server RAM) instead of creating temporary files on the hard disk with the same result of sorting the data.
sort_buffer_size = 2M
  • innodb_buffer_pool_size: This is the maximum size of the buffer used by the database engine to store the indexes and data of the database. For a server on which the Web server and the database server are running simultaneously, it is recommended to assign this configuration variable between 50% - 60% of the total RAM available in the system. This is the configuration parameter that offers the greatest improvement in the overall performance of the database.
innodb_buffer_pool_size = 2G

c) Additional parameters. To increase the performance of the DB we can modify other parameters such as:

  • performance_schema: In DBs in production we will disable this function as its use is recommended only in pre-production environments and for monitoring events that occur in the DB engine.
performance_schema = OFF
  • max_heap_table_size: This is the maximum size of a table that can be created by the DB user and stored in the memory.
max_heap_table_size = 32M
  • tmp_table_size: Specifies the maximum size of a temporary table created in memory during the execution of a complex query. When this specified maximum size is reached, the database engine automatically converts the internal temporary table in memory into an internal temporary table on disk.
tmp_table_size = 32M

2.2 Cleaning, optimising and repairing database tables

We can carry out this type of task on our database using database administration tools such as phpMyAdmin, HeidiSQL, MySQLWorkBench, etc. To perform these types of operations on our shop's database, we will have to execute different SQL code queries.

a) Cleaning up dynamic tables: Dynamic tables are tables where data is stored for statistical use, metrics, etc., the content of which is not essential for the functioning of the online shop (visits, connections, logs, etc.). These tables are usually filled with records on a daily basis, so they can reach a considerably large size if they are not cleaned frequently. We are going to detail those dynamic tables that should be cleaned periodically to prevent them from increasing in size too much.

Prestashop pivot tables are:

  • ps_connections
  • ps_connections_source
  • ps_connections_page
  • ps_guest
  • ps_log
  • ps_modules_perfs
  • ps_pagenotfound
  • ps_referrer_cache
  • ps_page_viewed
  • ps_smarty_cache
  • ps_smarty_last_flush
  • ps_smarty_lazy_cache
  • ps_statssearch

To clean these tables we can use the following SQL query:

TRUNCATE TABLE [name of the table];

For example, if we want to clean the ps_connections table we will use the following query:

TRUNCATE TABLE ps_connections;

What this query does is completely eliminate all the records in the table, leaving it totally empty.

b) Optimising and repairing tables: Many database management applications, such as HeidiSQL, include integrated tools for optimising and repairing database tables, although some actions can also be carried out manually using simple SQL queries:

To optimise tables by reorganising the table's storage structure, we can use the following SQL query:

OPTIMIZE TABLE [name of the table];

To repair the tables (only in tables with the MyISAM engine), we can use the following SQL query:

REPAIR TABLE [name of the table];

These queries only cover a small part of the process of optimising and repairing the tables. In order to solve referential integrity errors, defragment fragmented data, eliminate records with invalid values, etc., it is necessary to do so through specific software or specific modules for Presatshop, generally for a fee, although there are some free modules.

2.3 Prestashop modules for database optimisation and maintenance

We indicate some specific Prestashop modules for database optimisation and maintenance:

  • Prestashop Database Optimization (Free): Allows you to clean up the records stored in the database corresponding to unwanted shopping carts, connection information (visitor-related statistics), connection information related to page views and page types, connection information related to the origin of the visits, information about the shop's visitors/guests.

  • Prestashop Delete Connections (Free): Deletes and optimises the records in the database tables corresponding to the tables, connections_source, connection_page, cart, etc...

  • Ultimate Database Optimizer: (Paid) Monitors, optimises, repairs, defragments, cleans dynamic tables and fixes database errors. Advanced functions for comprehensive and periodic maintenance of the database.

3. Prestashop Application

This section combines tools and advice that can help you improve the performance of your Prestashop store, so that the server will be able to respond more efficiently to queries and requests from a greater number of users, and therefore you could get more sales.

3.1 Configuration (Smarty, Debug Mode, Optional Features, CCC, Cache)

These Prestashop application configuration options are available in the "Advanced Parameters\Performance" section of the administration panel (Back-office).

Smarty

Smarty is the name of the template engine used by PrestaShop themes and has the following options:

  1. Template compilation To improve front-end performance, PrestaShop caches HTML pages, with 3 modes of operation:
  • Never recompile template files. Normal behaviour: HTML pages are compiled and stored in the browser cache and are displayed as they are, even if the theme has since changed. This option is recommended if the shop is in production and no visual changes are to be made to the template files. This is the default option and provides the best performance for the shop, improving the loading speed of the site.
  • Recompile templates when files are modified. PrestaShop is able to recognise when a theme has been modified, so that the application only recompiles the template files if it detects that their content has been modified. We recommend this option if modifications are occasionally made to the template files.
  • Force compilation. Only activate this option if you are editing a topic and want to see the changes made every time you reload the page. The Smarty system will compile the template files every time the content is displayed to the web user. This mode significantly reduces the performance of the shop. This option is only recommended to be activated while maintenance, development or major modifications are being made to the website.
  1. Cache: This option allows you to disable the cache for all files, not just those belonging to the template files. Disable this option only for debugging modules and/or templates. In any other case, you should leave it enabled. The option “Clear Smarty cache” makes it possible to clear the cache with a single mouse click, instead of having to go and delete the files from the FTP server. It controls the use of cache files for the content displayed in the Fronted and database queries. It is very important that this option is enabled, otherwise the website's performance will be affected. It is only recommended to disable it for debugging tasks.

  2. Multi-server synchronisation. This function allows the cache to be synchronised between multiple interconnected web servers, optimising performance in distributed web hosting architectures. When enabled, it ensures the consistency of cached data on all servers, avoiding discrepancies and improving the overall efficiency of the system..

  3. Clear the cache. - This is the recommended option for most online shops. By clearing the cache after each modification (products, design, settings), you ensure that visitors always see the most up-to-date version of the site. This practice guarantees consistency between the displayed content and the information stored in the database, preventing visual and functional errors.

Debug mode

In debug mode, you can choose to reduce the impact that certain functionalities have on PrestaShop, and thus be able to accurately assess where an error is coming from. This section should only be used for error control and debugging, as debug mode slows down the loading of store items and displays existing error messages on the Frontend. For this reason it is very important to have all its options disabled while the store is in production.

If you have to activate any of these options to debug errors, the shop must first be in maintenance mode, otherwise web users may experience problems and errors while browsing the website.

Debug Mode Options:

  • Disable override methods. Many of PrestaShop's features can be overridden. If you enable this setting, all code overrides will be disabled, and you will be able to determine whether the problem comes from PrestaShop's own code or from a third-party module.

  • Debug mode. When this option is activated, technical error messages will be visible. It is useful when a person is helping someone else who does not have access to your shop but needs to know what is happening technically.

Modules

Disable non-native modules. PrestaShop's native modules are exhaustively tested so they should not present any kind of problem. If you enable this option, you will be able to determine if the problem comes from PrestaShop's own code (core or module), or from a third-party module.

Optional features

Some PrestaShop features can be disabled if you don't use them, as they can slow down your shop.

If your catalogue currently has products that make use of these features, you won't be able to disable them. You'll have to delete those products to be able to disable these options.

You can disable the following catalogue features:

  • Combinations. Product combinations allow you to offer a wide range of variants of the same item, simplifying the management of your catalogue and improving the shopping experience for your customers. With this feature, you can present a single product with multiple options, such as different sizes, colours, capacities, materials, styles, etc., allowing your customers to customise their purchase according to their preferences..

  • Features. Product features allow you to provide specific and detailed information about each item: weight, material, country of origin, etc.

  • Customer groups. Customer groups allow you to group customers within the same group in order to give them certain privileges and restrictions: discounts, module restrictions, etc.

(CCC) Compression, Caching and Combination.

CCC is a set of tools designed to minimise the server load and the time it takes to load the shop's theme.

It does what its name suggests: it combines text files of the same type into one larger file, reducing the number of files to download; it compresses the file using the Zip algorithm, making it download faster; finally, the compressed file is cached, so the server does not have to do this process every time a page is loaded, which relieves the load on the server processor.

Options (CCC) Compression, Compression and Caching:

  • "Smart cache" for style sheets (CSS). CSS files are text files that can be safely combined and compressed. This option combines all style sheets with CSS code from modules, templates and customised code and compresses them into a single file to reduce their size and increase the speed at which their content is read.

  • "Smart cache" for JavaScript code. JavaScript files are text files, but combining them can sometimes be problematic. Be sure to test everything before leaving this option enabled. This option merges all JavaScript code from modules, templates and custom code and compresses it into a single file to reduce its size and increase the speed at which its content is read.

  • Apache optimisation. This configuration setting will modify the web server configuration file to make it more efficient for CCC. Prestashop inserts advanced code in the .htaccess file located in the main directory of the store, to make use of the browser and server cache and the compression of the website content through Gzip and Deflate.

It is recommended that all these options are activated and only deactivated for debugging or during the development phases of the online shop.

Media servers (Only use when CCC is enabled)

This section allows you to redirect part of your shop's traffic (images and video files, for example) to other servers under your control, through other domains or subdomains — generally, the files are hosted on a CDN (Content Delivery Network).

This is one of the techniques that most improves the performance of the site since it distributes the load of some elements of the web in different CDN servers. This means that elements such as images, templates and modules are located on other servers. In this way, when a user visits the shop, the browser requests the information that they have stored from each of these servers. This means that the load is not borne by a single server, but rather each one takes on the load of its elements.

By configuring this option, the increase in performance and the increase in the loading speed of the website is extraordinary.

In Cloud servers with SWPanel you can automatically activate the CDN service without the need to configure this section of Prestashop and only by following the steps described in the 📃 Manual: How to activate Cloudflare's CDN through SWPanel for your Hosting Service you can also apply various configuration parameters described in 📃 Manual: How to adjust Cloudflare's CDN and cache settings

Cache

The server cache stores static versions of your dynamic web pages, allowing them to be served quickly to your visitors. This significantly reduces server load and compilation times, improving the overall performance of your store.

Difference with Prestashop Cache:

Unlike the Smarty cache (native to Prestashop), the server cache is managed at the hosting level. Therefore, its configuration and management require additional considerations:

Prerequisites:

  • Cache Extension Installed: Before activating any server cache system, make sure that the corresponding extension (for example, Varnish, Redis, Memcached) is installed on your server.

Considerations regarding Dynamic Content:

  • Frequent Updates: If your online shop undergoes constant changes (new products, images, design updates), disable the server cache and perform manual clean-ups. Otherwise, the changes may not be correctly reflected for your visitors.
  • Cache cleaning: Remember that cleaning the server cache is independent of cleaning the Prestashop cache.

Configuration Options:

This section allows you to activate the server cache and select the caching method compatible with your hosting provider.

SWPanel users:

Key recommendations:

  • Evaluate the frequency of updates: If you make constant changes, you can deactivate the server cache.
  • Make sure you have the cache extension installed: This is a fundamental step before activating the server cache.
  • Cache cleaning: If you make manual changes, clean the cache.

In short, the server cache is a powerful tool for improving the performance of your online shop, but its configuration and management require attention to detail.

3.2 Prestashop modules

It is common to increase, add to or customise the basic functionalities of Prestashop by installing modules/add-ons. The installation of these modules means adding more elements to the structure of the shop and also increasing the workload of the server, to a greater or lesser extent depending on its code architecture or functionalities. To prevent the use of these modules from causing a decrease in server performance, it is essential to provide it with the necessary hardware resources to take on the extra load.

We also recommend the following practices:

  • Only install official modules from the platform Prestashop Addons (Before being published, each module goes through a verification and quality control process to comply with the standards of the official platform).
  • Always keep the module updated to the latest version.
  • Only install the modules essential for the shop to function
  • Uninstall or deactivate the rest of the modules that are not being used.
  • Make use of modules that improve the website's performance, use of cache, optimise the database, etc

3.3 Prestashop update

You should update your site to the latest version of PrestaShop (8.x) to benefit from performance improvements and security fixes. Keeping your PrestaShop installation up to date guarantees the benefits of the latest features and optimisations provided by the platform.

To perform the major upgrade from a version 1.6, 1.7 to the latest available version 8.x (1.8) you can use the "official module" 1-Click Upgrade which will also generate a backup of your online shop as part of the upgrade process, so that you can restore it to its original state if any unexpected errors occur.

4 Web images

Images are one of the main elements of a web page or online shop. In the case of online shops, each product must contain one or more images. These elements, as with the rest, have a certain size. The more size and dimension an image has, the greater the workload it generates for the server to process these elements, therefore, the longer the loading time.

It is very important to optimise the images that are going to be used on the website, as this will reduce loading times and also have a positive effect on SEO.

To reduce the size of the images, we should use file formats or extensions that compress their data while maintaining a high level of image quality. The most common formats are as follows:

  • JPG: The most recognised and used image format for saving photos. Due to its compression, it is a format that loses quality every time you reduce its size.
  • PNG: With it you can add transparencies and, unlike JPG, it is a lossless compression format, ideal for use with all the elements that make up our website.
  • WebP: This is a modern image format that, thanks to a sophisticated compression algorithm, generates images that are smaller than JPG / PNG while maintaining high image quality. In addition, search engines such as Google improve the SEO positioning of websites that use this format for their images.

Once we have decided on the format in which we are going to save the images for our online shop, we should pay special attention to their resolution. If the space reserved for displaying an image is 250px, we should create an image of exactly this size, because otherwise, if the image is, for example, 500px, it will still only be displayed at 250px and the only thing we will achieve is to increase the size of the website. For this reason we advise you to create all the images at the actual size they will be displayed on your website.

To optimise and convert the images on your online shop there are módulos de Prestashop, generally paid for, or also free of charge some web applications or specific software such as paint.net.


2025 DeepThink Software SLU. All rights reserved. The prices shown on the website do not include any applicable taxes.