{"id":2679,"date":"2025-12-01T20:33:14","date_gmt":"2025-12-01T17:33:14","guid":{"rendered":"https:\/\/www.dchost.com\/blog\/prestashop-hosting-guide-php-mysql-caching-and-cdn-settings-for-a-fast-store\/"},"modified":"2025-12-01T20:33:14","modified_gmt":"2025-12-01T17:33:14","slug":"prestashop-hosting-guide-php-mysql-caching-and-cdn-settings-for-a-fast-store","status":"publish","type":"post","link":"https:\/\/www.dchost.com\/blog\/en\/prestashop-hosting-guide-php-mysql-caching-and-cdn-settings-for-a-fast-store\/","title":{"rendered":"PrestaShop Hosting Guide: PHP, MySQL, Caching and CDN Settings for a Fast Store"},"content":{"rendered":"<div class=\"dchost-blog-content-wrapper\"><p>PrestaShop can run on almost any basic hosting plan, but running it <strong>fast<\/strong> and <strong>stable<\/strong> is a different story. Sluggish category pages, slow checkout steps and random 500 errors usually have nothing to do with your theme or modules and almost everything to do with how PHP, MySQL, caching and CDN are configured on the server side. In this guide, we will walk through the exact settings we use and recommend at dchost.com when preparing hosting for a new or growing PrestaShop store. We will focus on practical, copy\u2011paste\u2011ready ideas you can apply on shared hosting, <a href=\"https:\/\/www.dchost.com\/vps\">VPS<\/a>, <a href=\"https:\/\/www.dchost.com\/dedicated-server\">dedicated server<\/a>s or colocation. If you are planning a new store, migrating from another provider or simply tired of a slow back office, this article will help you translate PrestaShop\u2019s technical requirements into concrete hosting decisions and configurations.<\/p>\n<div id=\"toc_container\" class=\"toc_transparent no_bullets\"><p class=\"toc_title\">\u0130&ccedil;indekiler<\/p><ul class=\"toc_list\"><li><a href=\"#What_PrestaShop_Really_Needs_From_Your_Hosting\"><span class=\"toc_number toc_depth_1\">1<\/span> What PrestaShop Really Needs From Your Hosting<\/a><\/li><li><a href=\"#PHP_Settings_for_a_Fast_PrestaShop_Store\"><span class=\"toc_number toc_depth_1\">2<\/span> PHP Settings for a Fast PrestaShop Store<\/a><ul><li><a href=\"#Recommended_PHP_Version_and_Extensions\"><span class=\"toc_number toc_depth_2\">2.1<\/span> Recommended PHP Version and Extensions<\/a><\/li><li><a href=\"#PHPFPM_and_Process_Manager_Settings\"><span class=\"toc_number toc_depth_2\">2.2<\/span> PHP\u2011FPM and Process Manager Settings<\/a><\/li><li><a href=\"#OPcache_Mandatory_for_PrestaShop\"><span class=\"toc_number toc_depth_2\">2.3<\/span> OPcache: Mandatory for PrestaShop<\/a><\/li><li><a href=\"#PHPini_Limits_for_PrestaShop\"><span class=\"toc_number toc_depth_2\">2.4<\/span> PHP.ini Limits for PrestaShop<\/a><\/li><\/ul><\/li><li><a href=\"#MySQLMariaDB_Configuration_for_PrestaShop\"><span class=\"toc_number toc_depth_1\">3<\/span> MySQL\/MariaDB Configuration for PrestaShop<\/a><ul><li><a href=\"#Engine_Charset_and_Collation\"><span class=\"toc_number toc_depth_2\">3.1<\/span> Engine, Charset and Collation<\/a><\/li><li><a href=\"#Key_MySQLInnoDB_Settings\"><span class=\"toc_number toc_depth_2\">3.2<\/span> Key MySQL\/InnoDB Settings<\/a><\/li><li><a href=\"#Indexes_and_Slow_Query_Analysis\"><span class=\"toc_number toc_depth_2\">3.3<\/span> Indexes and Slow Query Analysis<\/a><\/li><\/ul><\/li><li><a href=\"#Caching_Layers_for_PrestaShop_From_Simple_to_Advanced\"><span class=\"toc_number toc_depth_1\">4<\/span> Caching Layers for PrestaShop: From Simple to Advanced<\/a><ul><li><a href=\"#PrestaShops_BuiltIn_Caching_Options\"><span class=\"toc_number toc_depth_2\">4.1<\/span> PrestaShop\u2019s Built\u2011In Caching Options<\/a><\/li><li><a href=\"#Object_Cache_with_Redis_or_Memcached\"><span class=\"toc_number toc_depth_2\">4.2<\/span> Object Cache with Redis or Memcached<\/a><\/li><li><a href=\"#FullPage_Caching_Reverse_Proxy_Microcaching_and_Edge_Cache\"><span class=\"toc_number toc_depth_2\">4.3<\/span> Full\u2011Page Caching: Reverse Proxy, Microcaching and Edge Cache<\/a><\/li><\/ul><\/li><li><a href=\"#CDN_Settings_for_PrestaShop_Offload_What_You_Can\"><span class=\"toc_number toc_depth_1\">5<\/span> CDN Settings for PrestaShop: Offload What You Can<\/a><ul><li><a href=\"#When_Should_a_PrestaShop_Store_Add_a_CDN\"><span class=\"toc_number toc_depth_2\">5.1<\/span> When Should a PrestaShop Store Add a CDN?<\/a><\/li><li><a href=\"#Configuring_PrestaShop_to_Use_a_CDN\"><span class=\"toc_number toc_depth_2\">5.2<\/span> Configuring PrestaShop to Use a CDN<\/a><\/li><li><a href=\"#CacheControl_Headers_from_the_Origin\"><span class=\"toc_number toc_depth_2\">5.3<\/span> Cache\u2011Control Headers from the Origin<\/a><\/li><\/ul><\/li><li><a href=\"#Picking_the_Right_Hosting_Type_at_dchostcom_for_PrestaShop\"><span class=\"toc_number toc_depth_1\">6<\/span> Picking the Right Hosting Type at dchost.com for PrestaShop<\/a><ul><li><a href=\"#Shared_Hosting_Good_for_Small_or_New_Stores\"><span class=\"toc_number toc_depth_2\">6.1<\/span> Shared Hosting: Good for Small or New Stores<\/a><\/li><li><a href=\"#NVMe_VPS_The_Sweet_Spot_for_Growing_PrestaShop_Stores\"><span class=\"toc_number toc_depth_2\">6.2<\/span> NVMe VPS: The Sweet Spot for Growing PrestaShop Stores<\/a><\/li><li><a href=\"#Dedicated_Server_or_Colocation_When_PrestaShop_Is_MissionCritical\"><span class=\"toc_number toc_depth_2\">6.3<\/span> Dedicated Server or Colocation: When PrestaShop Is Mission\u2011Critical<\/a><\/li><\/ul><\/li><li><a href=\"#Monitoring_Testing_and_a_Simple_Optimization_Workflow\"><span class=\"toc_number toc_depth_1\">7<\/span> Monitoring, Testing and a Simple Optimization Workflow<\/a><ul><li><a href=\"#1_Baseline_Measure_Before_You_Change\"><span class=\"toc_number toc_depth_2\">7.1<\/span> 1. Baseline: Measure Before You Change<\/a><\/li><li><a href=\"#2_Apply_One_Change_at_a_Time\"><span class=\"toc_number toc_depth_2\">7.2<\/span> 2. Apply One Change at a Time<\/a><\/li><li><a href=\"#3_Keep_an_Eye_on_Logs\"><span class=\"toc_number toc_depth_2\">7.3<\/span> 3. Keep an Eye on Logs<\/a><\/li><\/ul><\/li><li><a href=\"#Wrapping_Up_Putting_It_All_Together_for_a_Fast_PrestaShop\"><span class=\"toc_number toc_depth_1\">8<\/span> Wrapping Up: Putting It All Together for a Fast PrestaShop<\/a><\/li><\/ul><\/div>\n<h2><span id=\"What_PrestaShop_Really_Needs_From_Your_Hosting\">What PrestaShop Really Needs From Your Hosting<\/span><\/h2>\n<p>Before touching config files, it helps to understand what actually makes PrestaShop feel fast. PrestaShop is a classic LAMP\/LEMP style PHP application with a heavy reliance on the database. That means your store\u2019s speed depends primarily on four layers:<\/p>\n<ul>\n<li><strong>PHP<\/strong> \u2013 version, handler (PHP\u2011FPM), OPcache and memory limits<\/li>\n<li><strong>MySQL\/MariaDB<\/strong> \u2013 buffer sizes, connections and indexes<\/li>\n<li><strong>Caching<\/strong> \u2013 PrestaShop\u2019s own cache, object cache (Redis\/Memcached) and optional full\u2011page caching<\/li>\n<li><strong>CDN<\/strong> \u2013 offloading images, CSS, JS and media to edge servers<\/li>\n<\/ul>\n<p>Hardware and plan size still matter, but many stores run badly on powerful servers simply because the software stack is not tuned. If you are unsure about how much CPU, RAM and bandwidth to start with, we strongly recommend reading our capacity planning article <a href='https:\/\/www.dchost.com\/blog\/en\/yeni-web-sitesi-icin-cpu-ram-ve-trafik-nasil-hesaplanir\/'>how much CPU, RAM and bandwidth a new website needs<\/a> and then mapping those ideas to your expected PrestaShop traffic.<\/p>\n<p>Once you have the right baseline in mind, the real speed boost comes from getting PHP, MySQL, caching and the CDN to work together instead of fighting each other.<\/p>\n<h2><span id=\"PHP_Settings_for_a_Fast_PrestaShop_Store\">PHP Settings for a Fast PrestaShop Store<\/span><\/h2>\n<h3><span id=\"Recommended_PHP_Version_and_Extensions\">Recommended PHP Version and Extensions<\/span><\/h3>\n<p>PrestaShop runs on multiple PHP versions, but you should always use the <strong>latest stable PHP version supported by your specific PrestaShop release and modules<\/strong>. In practice this usually means a modern PHP 8.x version.<\/p>\n<p>Why it matters:<\/p>\n<ul>\n<li>PHP 8.x can easily be <strong>20\u201340% faster<\/strong> than older 7.x versions for the same code<\/li>\n<li>Better type handling and error reporting reduces hard\u2011to\u2011debug issues<\/li>\n<li>Newer versions receive security patches and performance improvements<\/li>\n<\/ul>\n<p>Must\u2011have PHP extensions for PrestaShop typically include:<\/p>\n<ul>\n<li>pdo_mysql<\/li>\n<li>intl<\/li>\n<li>curl<\/li>\n<li>mbstring<\/li>\n<li>zip<\/li>\n<li>gd or imagick (for image manipulation)<\/li>\n<li>openssl<\/li>\n<li>json (built\u2011in on modern PHP)<\/li>\n<\/ul>\n<p>On a cPanel or similar panel at dchost.com, you can usually pick PHP version and extensions per domain from a graphical interface. On VPS or dedicated servers, these are set via package manager and PHP\u2011FPM pool configuration.<\/p>\n<p>If you are planning a PHP upgrade, our detailed article <a href='https:\/\/www.dchost.com\/blog\/en\/php-8-x-yukseltme-kontrol-listesi-wordpress-ve-laravelde-geriye-uyumluluk-opcache-preload-ve-fpm-havuz-ayarlari-nasil-tatli-tatli-kurulur\/'>PHP 8.x upgrade checklist<\/a> (although focused on WordPress\/Laravel) covers the same upgrade mindset you should use for PrestaShop: staging first, logs, OPcache, FPM pools.<\/p>\n<h3><span id=\"PHPFPM_and_Process_Manager_Settings\">PHP\u2011FPM and Process Manager Settings<\/span><\/h3>\n<p>For any serious PrestaShop store, PHP\u2011FPM is the right handler. It lets you control how many PHP processes are spawned and how they share memory. Poor FPM settings are a very common reason for slow stores or 502 errors.<\/p>\n<p>Key PHP\u2011FPM directives (per pool) to review:<\/p>\n<ul>\n<li><strong>pm<\/strong> \u2013 use <strong>dynamic<\/strong> for most sites, <strong>ondemand<\/strong> for very small test sites<\/li>\n<li><strong>pm.max_children<\/strong> \u2013 how many concurrent PHP processes you allow<\/li>\n<li><strong>pm.start_servers<\/strong>, <strong>pm.min_spare_servers<\/strong>, <strong>pm.max_spare_servers<\/strong> \u2013 how many processes are pre\u2011warmed<\/li>\n<li><strong>pm.max_requests<\/strong> \u2013 how many requests a process serves before restart (fights memory leaks)<\/li>\n<\/ul>\n<p>A simple starting point for a mid\u2011size PrestaShop store on a 4 vCPU \/ 8 GB RAM VPS might look like:<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">pm = dynamic\npm.max_children = 20\npm.start_servers = 4\npm.min_spare_servers = 4\npm.max_spare_servers = 10\npm.max_requests = 500\n<\/code><\/pre>\n<p>The exact numbers depend on:<\/p>\n<ul>\n<li>Available RAM and other processes (MySQL, Redis, web server)<\/li>\n<li>Average memory consumption of one PHP process (measure with top\/htop)<\/li>\n<li>Peak concurrent users during campaigns or sales<\/li>\n<\/ul>\n<p>Rule of thumb: each PrestaShop PHP process may use 80\u2013200 MB depending on modules and theme. You never want to spawn so many children that the server starts swapping.<\/p>\n<h3><span id=\"OPcache_Mandatory_for_PrestaShop\">OPcache: Mandatory for PrestaShop<\/span><\/h3>\n<p>OPcache caches compiled PHP bytecode in RAM so scripts don\u2019t need to be parsed and compiled on every request. Turning it off is like disabling the engine\u2019s turbo.<\/p>\n<p>Core OPcache settings for PrestaShop could be:<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">opcache.enable=1\nopcache.memory_consumption=256\nopcache.interned_strings_buffer=16\nopcache.max_accelerated_files=20000\nopcache.revalidate_freq=60\nopcache.validate_timestamps=1\n<\/code><\/pre>\n<p>Notes:<\/p>\n<ul>\n<li><strong>opcache.memory_consumption<\/strong>: 128\u2013256 MB is usually fine for one store, higher if you host many projects<\/li>\n<li><strong>opcache.max_accelerated_files<\/strong>: increase if you see cache full warnings in logs<\/li>\n<li><strong>validate_timestamps<\/strong> and <strong>revalidate_freq<\/strong>: keep automatic detection in place unless you use a deploy script that clears OPcache<\/li>\n<\/ul>\n<h3><span id=\"PHPini_Limits_for_PrestaShop\">PHP.ini Limits for PrestaShop<\/span><\/h3>\n<p>PrestaShop\u2019s back office uses AJAX, large forms and image uploads. Too conservative PHP limits break updates or product imports.<\/p>\n<p>Reasonable defaults for a production store:<\/p>\n<ul>\n<li><strong>memory_limit<\/strong>: 512M (lower can work, but 512M avoids many headaches in back office)<\/li>\n<li><strong>upload_max_filesize<\/strong>: 32M (adjust to your largest product\/image files)<\/li>\n<li><strong>post_max_size<\/strong>: 32M or slightly above upload_max_filesize<\/li>\n<li><strong>max_execution_time<\/strong>: 120 (import\/export operations sometimes need more than 30 seconds)<\/li>\n<li><strong>max_input_vars<\/strong>: 3000\u20135000 (important if you have large forms or many attributes)<\/li>\n<\/ul>\n<p>On shared hosting with dchost.com, some of these limits are editable in the control panel. On VPS, dedicated or colocation setups, you manage them via php.ini or per\u2011pool .user.ini files.<\/p>\n<h2><span id=\"MySQLMariaDB_Configuration_for_PrestaShop\">MySQL\/MariaDB Configuration for PrestaShop<\/span><\/h2>\n<p>PrestaShop is very database\u2011centric: category filters, layered navigation, search, cart, checkout and statistics constantly hit MySQL\/MariaDB. Even a well\u2011tuned PHP stack feels slow if the database is struggling.<\/p>\n<p>Many of the ideas we share in our article <a href='https:\/\/www.dchost.com\/blog\/en\/woocommerce-icin-mysql-innodb-tuning-kontrol-listesi-buffer-pool-indeksleme-ve-slow-query-analizi-nasil-akillica-yapilir\/'>WooCommerce MySQL\/InnoDB tuning checklist<\/a> translate directly to PrestaShop, because both are e\u2011commerce applications with similar access patterns.<\/p>\n<h3><span id=\"Engine_Charset_and_Collation\">Engine, Charset and Collation<\/span><\/h3>\n<p>For modern PrestaShop versions, you should use:<\/p>\n<ul>\n<li><strong>Storage engine<\/strong>: InnoDB for all tables<\/li>\n<li><strong>Charset<\/strong>: utf8mb4<\/li>\n<li><strong>Collation<\/strong>: utf8mb4_general_ci or utf8mb4_unicode_ci<\/li>\n<\/ul>\n<p>If you are migrating from an old server, ensure tables are not still using MyISAM. MyISAM prevents row\u2011level locks and can become a bottleneck under concurrent writes (e.g. high checkout traffic).<\/p>\n<h3><span id=\"Key_MySQLInnoDB_Settings\">Key MySQL\/InnoDB Settings<\/span><\/h3>\n<p>A sample my.cnf (or mysqld section) for a dedicated PrestaShop database on a 4\u20138 GB RAM server might include:<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">innodb_buffer_pool_size = 2G\ninnodb_buffer_pool_instances = 2\ninnodb_log_file_size = 512M\ninnodb_flush_log_at_trx_commit = 1\ninnodb_flush_method = O_DIRECT\nmax_connections = 200\nquery_cache_type = 0\nquery_cache_size = 0\ntmp_table_size = 256M\nmax_heap_table_size = 256M\nslow_query_log = 1\nslow_query_log_file = \/var\/log\/mysql\/slow.log\nlong_query_time = 1\n<\/code><\/pre>\n<p>What these do for PrestaShop:<\/p>\n<ul>\n<li><strong>innodb_buffer_pool_size<\/strong> \u2013 most important parameter; this is where MySQL caches table and index data. Aim for 50\u201370% of RAM on a dedicated DB server.<\/li>\n<li><strong>innodb_log_file_size<\/strong> \u2013 larger logs improve write throughput for busy stores.<\/li>\n<li><strong>query_cache_type\/size<\/strong> \u2013 query cache is deprecated\/removed in newer MySQL versions; turning it off avoids locking issues.<\/li>\n<li><strong>tmp_table_size \/ max_heap_table_size<\/strong> \u2013 larger temp table space reduces on\u2011disk temp tables for complex reports and filters.<\/li>\n<li><strong>slow_query_log<\/strong> \u2013 mandatory if you care about performance; it tells you which PrestaShop queries are really slow.<\/li>\n<\/ul>\n<h3><span id=\"Indexes_and_Slow_Query_Analysis\">Indexes and Slow Query Analysis<\/span><\/h3>\n<p>Even with good my.cnf values, missing or suboptimal indexes can kill performance\u2014especially on modules that add their own tables. Use slow query logs and tools like EXPLAIN to identify queries that scan entire tables.<\/p>\n<p>Practical workflow:<\/p>\n<ol>\n<li>Enable slow_query_log and set long_query_time to 1\u20132 seconds.<\/li>\n<li>Simulate common store actions: browse categories, apply filters, search, add to cart, checkout.<\/li>\n<li>Inspect slow.log and look for queries that repeat often.<\/li>\n<li>Run EXPLAIN on them and see if proper indexes are being used.<\/li>\n<li>Add composite indexes where appropriate (e.g. on columns used together in WHERE or ORDER BY).<\/li>\n<\/ol>\n<p>Do this first in a staging environment or off\u2011peak hours if you are not comfortable altering tables in production.<\/p>\n<h2><span id=\"Caching_Layers_for_PrestaShop_From_Simple_to_Advanced\">Caching Layers for PrestaShop: From Simple to Advanced<\/span><\/h2>\n<p>Caching is where PrestaShop performance can jump dramatically with relatively little effort. Think of caching as multiple layers:<\/p>\n<ul>\n<li>Application\u2011level cache inside PrestaShop<\/li>\n<li>Object cache with Redis\/Memcached<\/li>\n<li>Full\u2011page HTTP cache (reverse proxy or web server)<\/li>\n<li>CDN cache for static assets (we will cover in the next section)<\/li>\n<\/ul>\n<h3><span id=\"PrestaShops_BuiltIn_Caching_Options\">PrestaShop\u2019s Built\u2011In Caching Options<\/span><\/h3>\n<p>Inside the back office, PrestaShop offers basic caching options under Advanced Parameters \u2192 Performance. At minimum, you should:<\/p>\n<ul>\n<li>Enable <strong>Smarty caching<\/strong> (check the recommended option for production)<\/li>\n<li>Enable <strong>template compilation on changes only<\/strong>, not on every request<\/li>\n<li>Turn on <strong>CCC (Combine, Compress and Cache)<\/strong> for CSS and JS when your theme supports it<\/li>\n<\/ul>\n<p>Smarty and CCC reduce repeated work for layout and assets. However, they do not remove database calls completely, so you still benefit a lot from deeper caching layers.<\/p>\n<h3><span id=\"Object_Cache_with_Redis_or_Memcached\">Object Cache with Redis or Memcached<\/span><\/h3>\n<p>Object caching stores frequently used data structures (e.g. configuration, translations, some query results) in RAM, reducing repeated SQL queries. PrestaShop supports Memcached in core and Redis via third\u2011party modules.<\/p>\n<p>Which one should you choose?<\/p>\n<ul>\n<li><strong>Memcached<\/strong>: simple and well supported, good for ephemeral cache.<\/li>\n<li><strong>Redis<\/strong>: more features (persistence, advanced data types), usually better tooling and observability.<\/li>\n<\/ul>\n<p>On a VPS or dedicated server at dchost.com, running a local Redis instance for a busy PrestaShop store is often the sweet spot. You get low\u2011latency RAM access and can enable basic persistence so cache does not evaporate on every restart.<\/p>\n<p>If you want a deeper dive into how Redis behaves as an object cache (TTL, eviction policies, persistence strategies), our article <a href='https:\/\/www.dchost.com\/blog\/en\/wordpress-ve-woocommerce-icin-redis-mi-memcached-mi-kalici-nesne-onbellegi-ttl-ve-eviction-ayarlarini-ne-zaman-nasil-yaparsin\/'>Redis vs Memcached for WordPress\/WooCommerce<\/a> gives you a mental model that also applies nicely to PrestaShop.<\/p>\n<h3><span id=\"FullPage_Caching_Reverse_Proxy_Microcaching_and_Edge_Cache\">Full\u2011Page Caching: Reverse Proxy, Microcaching and Edge Cache<\/span><\/h3>\n<p>Full\u2011page caching means the dynamic HTML of certain pages is cached so future visitors receive the cached version without invoking PHP or the database at all. For PrestaShop, you must be careful not to cache personalized content like carts, logged\u2011in user pages or checkout steps.<\/p>\n<p>There are three common approaches:<\/p>\n<ul>\n<li><strong>Varnish<\/strong> in front of Apache\/Nginx<\/li>\n<li><strong>Nginx FastCGI microcaching<\/strong> in front of PHP\u2011FPM<\/li>\n<li><strong>LiteSpeed cache<\/strong> if you use a LiteSpeed web server<\/li>\n<\/ul>\n<p>For many stores, Nginx microcaching is a practical starting point: cache category and product pages for 1\u20135 seconds for anonymous users. This drastically reduces CPU spikes during traffic peaks but still keeps stock, prices and carts fresh.<\/p>\n<p>We have a dedicated article explaining this concept for PHP apps: <a href='https:\/\/www.dchost.com\/blog\/en\/nginx-mikro-onbellekleme-ile-php-uygulamalarini-ucurmak-1-5-sn-cache-bypass-ve-purge-ne-zaman-nasil\/'>how Nginx microcaching makes PHP feel instantly faster<\/a>. The examples are generic enough to adapt to PrestaShop, with the same principles: short cache TTL, precise bypass rules and cache purge when needed.<\/p>\n<p>Key idea: do not try to cache everything. Focus on:<\/p>\n<ul>\n<li>Anonymous product and category pages<\/li>\n<li>CMS pages (FAQ, about, contact forms with CSRF exceptions)<\/li>\n<li>Home page, landing pages and blog\/news area if you have one<\/li>\n<\/ul>\n<p>Always bypass cache for:<\/p>\n<ul>\n<li>Cart and checkout<\/li>\n<li>My account area<\/li>\n<li>Any page with user\u2011specific content or non\u2011idempotent actions<\/li>\n<\/ul>\n<h2><span id=\"CDN_Settings_for_PrestaShop_Offload_What_You_Can\">CDN Settings for PrestaShop: Offload What You Can<\/span><\/h2>\n<p>A CDN (Content Delivery Network) does two things for your PrestaShop store:<\/p>\n<ul>\n<li>Serves static assets (images, CSS, JS, fonts, media) from locations physically closer to your visitors<\/li>\n<li>Shields your origin server from a large part of the traffic, especially images<\/li>\n<\/ul>\n<p>If you are new to CDNs in general, our article <a href='https:\/\/www.dchost.com\/blog\/en\/content-delivery-network-cdn-nedir-web-siteniz-icin-avantajlari\/'>what is a Content Delivery Network and its advantages for your website<\/a> gives a solid foundation before you dive into concrete PrestaShop settings.<\/p>\n<h3><span id=\"When_Should_a_PrestaShop_Store_Add_a_CDN\">When Should a PrestaShop Store Add a CDN?<\/span><\/h3>\n<p>We usually recommend enabling a CDN when at least one of these is true:<\/p>\n<ul>\n<li>You have international traffic (visitors far from your data center)<\/li>\n<li>Your pages contain many large images (fashion, furniture, electronics)<\/li>\n<li>You expect strong traffic peaks from campaigns or marketplaces<\/li>\n<li>Your TTFB is fine but total load time is high due to asset downloads<\/li>\n<\/ul>\n<p>Even small stores with local audiences benefit from less load on the origin: fewer requests, lower CPU usage and more room for growth without changing servers.<\/p>\n<h3><span id=\"Configuring_PrestaShop_to_Use_a_CDN\">Configuring PrestaShop to Use a CDN<\/span><\/h3>\n<p>PrestaShop can be configured to load static assets from a media server or CDN subdomain. The typical pattern looks like this:<\/p>\n<ul>\n<li>Create a subdomain such as <strong>cdn.yourstore.com<\/strong> and point it to your CDN.<\/li>\n<li>Configure your CDN so it pulls content from your origin (your main store domain).<\/li>\n<li>In PrestaShop back office (Advanced Parameters \u2192 Performance), set your media server \/ CDN domain for static assets.<\/li>\n<\/ul>\n<p>Important details:<\/p>\n<ul>\n<li>Make sure your CDN is configured for HTTPS and has a valid <a href=\"https:\/\/www.dchost.com\/ssl\">SSL certificate<\/a>.<\/li>\n<li>Respect cookies: serve static files from a domain that does not need PrestaShop\u2019s session cookies when possible.<\/li>\n<li>Configure sensible cache TTL values on the CDN (e.g. 1 week or 1 month for images, shorter for CSS\/JS during development).<\/li>\n<\/ul>\n<p>Many CDNs support override rules based on paths and file extensions. Use these to differentiate cache times:<\/p>\n<ul>\n<li>Images: high TTL, maybe 30 days<\/li>\n<li>CSS, JS: medium TTL, 1\u20137 days (with cache\u2011busting \/ versioned filenames)<\/li>\n<li>HTML: usually bypass or very short TTL unless you know what you are doing<\/li>\n<\/ul>\n<h3><span id=\"CacheControl_Headers_from_the_Origin\">Cache\u2011Control Headers from the Origin<\/span><\/h3>\n<p>CDNs respect the Cache\u2011Control headers sent by your origin server unless you override them. Configure Apache or Nginx (or LiteSpeed) to send efficient headers:<\/p>\n<pre class=\"language-nginx line-numbers\"><code class=\"language-nginx\"># Example for Nginx\nlocation ~* .(css|js|gif|jpg|jpeg|png|webp|svg|ico|woff2?)$ {\n    expires 30d;\n    add_header Cache-Control &quot;public, max-age=2592000, immutable&quot;;\n}\n<\/code><\/pre>\n<p>The key is to pair long TTLs with versioned filenames (e.g. style.v123.css) so you can deploy new designs without waiting for old assets to expire. For a deeper dive into browser cache\u2011control strategies, see our article <a href='https:\/\/www.dchost.com\/blog\/en\/nereden-baslamaliyiz-bir-css-dosyasinin-pesinde\/'>how to stop fighting your cache with Cache-Control and asset fingerprinting<\/a> which, while written with general web apps in mind, applies perfectly to PrestaShop themes.<\/p>\n<h2><span id=\"Picking_the_Right_Hosting_Type_at_dchostcom_for_PrestaShop\">Picking the Right Hosting Type at dchost.com for PrestaShop<\/span><\/h2>\n<p>Now that we have talked about tuning, what kind of hosting should you pick for a PrestaShop store?<\/p>\n<h3><span id=\"Shared_Hosting_Good_for_Small_or_New_Stores\">Shared Hosting: Good for Small or New Stores<\/span><\/h3>\n<p>Shared hosting is enough if:<\/p>\n<ul>\n<li>Your catalog is small (hundreds, not tens of thousands of products)<\/li>\n<li>Traffic is modest and mostly local<\/li>\n<li>You do not run heavy custom modules or complex integrations<\/li>\n<\/ul>\n<p>On our shared hosting platforms, you still get modern PHP versions, OPcache and MySQL, but with stricter resource limits. It is a great starting point while you validate your product\u2011market fit.<\/p>\n<h3><span id=\"NVMe_VPS_The_Sweet_Spot_for_Growing_PrestaShop_Stores\">NVMe VPS: The Sweet Spot for Growing PrestaShop Stores<\/span><\/h3>\n<p>As soon as you see performance issues or CPU\/RAM limits on shared hosting, a VPS with NVMe storage becomes very attractive. NVMe disks drastically reduce IO wait on database and cache workloads, which is exactly what e\u2011commerce generates.<\/p>\n<p>For guidance on how to select vCPU, RAM and storage, our article <a href='https:\/\/www.dchost.com\/blog\/en\/woocommerce-laravel-ve-node-jsde-dogru-vps-kaynaklarini-nasil-secersin-cpu-ram-nvme-ve-bant-genisligi-rehberi\/'>choosing VPS specs for WooCommerce, Laravel and Node.js<\/a> shows the same sizing logic we use for PrestaShop: start from traffic and queries, not from random plan labels.<\/p>\n<p>Rough orientation for PrestaShop on NVMe VPS:<\/p>\n<ul>\n<li>Small store, light traffic: 2 vCPU, 4 GB RAM<\/li>\n<li>Medium store, regular campaigns: 4 vCPU, 8 GB RAM<\/li>\n<li>Large store, many modules\/integrations: 8+ vCPU, 16+ GB RAM<\/li>\n<\/ul>\n<p>On a VPS you can run local Redis, finely tune PHP\u2011FPM and MySQL, and add monitoring tools. That level of control is what lets you squeeze maximum performance per euro.<\/p>\n<h3><span id=\"Dedicated_Server_or_Colocation_When_PrestaShop_Is_MissionCritical\">Dedicated Server or Colocation: When PrestaShop Is Mission\u2011Critical<\/span><\/h3>\n<p>For very high traffic or mission\u2011critical PrestaShop stores, dedicated servers or colocation at our data centers provide:<\/p>\n<ul>\n<li>Full control of CPU and RAM, with no noisy neighbors<\/li>\n<li>Custom storage layouts (RAID, NVMe + HDD tiers)<\/li>\n<li>Dedicated networking and firewalling options<\/li>\n<li>Room to scale to multi\u2011server architectures (separate DB, cache, search, queue workers)<\/li>\n<\/ul>\n<p>At that scale, you might deploy:<\/p>\n<ul>\n<li>One or more web servers running Nginx\/Apache + PHP\u2011FPM<\/li>\n<li>A dedicated database server with tuned MySQL\/MariaDB<\/li>\n<li>One or more cache servers (Redis\/Memcached, full\u2011page cache)<\/li>\n<li>Optional search engine nodes (Elasticsearch\/OpenSearch, etc.)<\/li>\n<\/ul>\n<p>The good news is that the tuning principles in this article stay the same; you just apply them to each layer separately instead of one all\u2011in\u2011one server.<\/p>\n<h2><span id=\"Monitoring_Testing_and_a_Simple_Optimization_Workflow\">Monitoring, Testing and a Simple Optimization Workflow<\/span><\/h2>\n<p>Configuration is not a one\u2011off task. Stores evolve, modules are added, traffic patterns change. To keep your PrestaShop fast, you need a simple, repeatable workflow.<\/p>\n<h3><span id=\"1_Baseline_Measure_Before_You_Change\">1. Baseline: Measure Before You Change<\/span><\/h3>\n<ul>\n<li>Use tools like WebPageTest, GTmetrix or your browser dev tools to record TTFB, time to interactive and total load time.<\/li>\n<li>Note down worst pages: heavy categories, search results, checkout.<\/li>\n<li>Record CPU\/RAM usage on the server during light and heavy traffic.<\/li>\n<\/ul>\n<h3><span id=\"2_Apply_One_Change_at_a_Time\">2. Apply One Change at a Time<\/span><\/h3>\n<ul>\n<li>Increase innodb_buffer_pool_size or adjust PHP\u2011FPM children counts.<\/li>\n<li>Enable Redis\/Memcached and PrestaShop caching.<\/li>\n<li>Add a CDN for static assets.<\/li>\n<\/ul>\n<p>After each change, measure again. Do not bundle five tweaks together and then guess which one helped or hurt.<\/p>\n<h3><span id=\"3_Keep_an_Eye_on_Logs\">3. Keep an Eye on Logs<\/span><\/h3>\n<ul>\n<li>PHP error logs: look for memory errors, fatal errors from modules.<\/li>\n<li>MySQL slow query log: track queries over 1\u20132 seconds and optimize or cache them.<\/li>\n<li>Web server logs: monitor 4xx\/5xx status codes and response times.<\/li>\n<\/ul>\n<p>With even basic monitoring, you can catch issues early and avoid the pattern where small performance regressions accumulate until the store feels unusable.<\/p>\n<h2><span id=\"Wrapping_Up_Putting_It_All_Together_for_a_Fast_PrestaShop\">Wrapping Up: Putting It All Together for a Fast PrestaShop<\/span><\/h2>\n<p>Making PrestaShop fast is less about magic tricks and more about getting the fundamentals right and aligned. Use a modern PHP 8.x version with OPcache enabled and properly tuned PHP\u2011FPM pools. Give MySQL or MariaDB enough RAM via innodb_buffer_pool_size, track slow queries and fix indexing where it hurts. Turn on PrestaShop\u2019s built\u2011in caching, layer Redis or Memcached on top, and optionally introduce microcaching on the web server for anonymous product\/category pages. Finally, let a CDN handle the heavy lifting for images, CSS and JS so your origin server can focus on generating dynamic content.<\/p>\n<p>At dchost.com, we design our shared hosting, NVMe VPS, dedicated and colocation options with exactly these needs in mind, so you can start small and scale without rewriting your architecture every six months. If you are planning a new PrestaShop project or want to move an existing store to a faster and more controllable environment, our team can help you choose the right plan and apply the PHP, MySQL, caching and CDN settings outlined here in a safe, tested way. Build a store your customers enjoy using\u2014and a hosting stack you do not have to fight with every campaign day.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>PrestaShop can run on almost any basic hosting plan, but running it fast and stable is a different story. Sluggish category pages, slow checkout steps and random 500 errors usually have nothing to do with your theme or modules and almost everything to do with how PHP, MySQL, caching and CDN are configured on the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2680,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-2679","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-teknoloji"],"_links":{"self":[{"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/posts\/2679","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/comments?post=2679"}],"version-history":[{"count":0,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/posts\/2679\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/media\/2680"}],"wp:attachment":[{"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/media?parent=2679"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/categories?post=2679"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/tags?post=2679"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}