{"id":5067,"date":"2015-06-01T09:56:23","date_gmt":"2015-06-01T06:56:23","guid":{"rendered":"http:\/\/blog.cs-cart.com\/?p=5067"},"modified":"2025-04-01T13:56:35","modified_gmt":"2025-04-01T09:56:35","slug":"five-server-tweaks-to-get-maximum-speed-out-of-cs-cart-4-3-1","status":"publish","type":"post","link":"https:\/\/www.cs-cart.com\/blog\/five-server-tweaks-to-get-maximum-speed-out-of-cs-cart-4-3-1\/","title":{"rendered":"Five Server Tweaks to Get Maximum Speed out of CS-Cart 4.3.1"},"content":{"rendered":"\n<p><a title=\"CS-Cart 4.3.1 released\" href=\"https:\/\/www.cs-cart.com\/blog\/cs-cart-and-multi-vendor-4-3-1-released\/\" target=\"_blank\" rel=\"noopener\">CS-Cart 4.3.1 is now available<\/a>. We\u2019ve done a solid piece of work to speed it up.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.cs-cart.com\/blog\/wp-content\/uploads\/pagespeed2.png?w=800&#038;ssl=1\" alt=\"\"\/><\/figure>\n\n\n\n<p>CS-Cart 4.3.1 is fast because it\u2019s well-optimized, but the speed also depends on the server configuration.<\/p>\n\n\n\n<p>We\u2019ve prepared <strong>five server tweaks<\/strong> that will help you get the maximum speed boost from CS-Cart 4.3.1.<\/p>\n\n\n\n<div style=\"padding: 10px; border: 1px solid #f9cb9c; background: #ffe599;\">\n<p>Before tweaking, check if your server has all the required libraries and modules:<\/p>\n<ol style=\"list-style-type: disc; padding-left: 15px; text-indent: 0;\">\n<li>Create the <em>phpinfo.php<\/em> file in your server\u2019s root directory.<\/li>\n<li>Open the file via any text editor and type this code:<\/li>\n<\/ol>\n<p style=\"padding: 10px; border: 1px solid #999999; background: #d9d9d9; font-family: consolas;\">&lt;?php<br \/>phpinfo();<br \/>?&gt;<\/p>\n<ol style=\"list-style-type: disc; padding-left: 15px; text-indent: 0;\">\n<li>Save the changes and close the file.<\/li>\n<li>Visit the URL of the <em>phpinfo.php<\/em> file in your web browser. For example: <em><a href=\"https:\/\/localhost\/phpinfo.php\">https:\/\/localhost\/phpinfo.php<\/a><\/em>. You will see the detailed information about your PHP version, installed modules, libraries, and more.<\/li>\n<li>Press CTRL + F (Command + F for Mac) and type the library or module name.<\/li>\n<li>If you can&#8217;t find a library or a module, your server doesn\u2019t have it. Before tweaking, install missing libraries and modules.<\/li>\n<\/ol>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Use_PHP_56\"><\/span>Use PHP 5.6<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>CS-Cart 4.3.1 works faster with <strong>PHP version 5.6<\/strong>. <a title=\"Migration to 5.6 in PHP docs\" href=\"https:\/\/php.net\/manual\/en\/migration56.php\" target=\"_blank\" rel=\"noopener\">Update PHP<\/a> on your server to 5.6 to accelerate your store.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.cs-cart.com\/blog\/wp-content\/uploads\/phpver.png?w=800&#038;ssl=1\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Enable_OPcache\"><\/span>Enable OPcache<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Use the <a title=\"What is OPcache\" href=\"https:\/\/www.sitepoint.com\/understanding-opcache\/\" target=\"_blank\" rel=\"noopener\">OPcache<\/a> caching engine to speed up PHP scripts.<\/p>\n\n\n\n<p>Every time the PHP interpreter runs a PHP script, it compiles the script into what\u2019s called <em>byte code<\/em>. OPcache allows the PHP interpreter to compile the script only once and save the byte code into the memory. Every time CS-Cart calls the PHP script, the interpreter retrieves the byte code from memory. Retrieving the byte code from memory is faster than compiling the PHP script again.<\/p>\n\n\n\n<p>CS-Cart 4.3.1 uses OPcache by default if you have it installed and enabled.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Install_mod_deflate\"><\/span>Install <em>mod_deflate<\/em><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The <a title=\"mod_deflate in Wikipedia\" href=\"https:\/\/en.wikipedia.org\/wiki\/Mod_deflate\" target=\"_blank\" rel=\"noopener\">mod_deflate<\/a> module compresses web pages in CS-Cart. The smaller the page size, the faster a web server transmits page data, and the quicker a customer sees the page.<\/p>\n\n\n\n<p>Ask you hosting provider if the server has mod_deflate.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Use_Imagick\"><\/span>Use Imagick<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><a title=\"What is imagick\" href=\"https:\/\/www.rubblewebs.co.uk\/imagemagick\/imagick.php\" target=\"_blank\" rel=\"noopener\">Imagick<\/a> is an image processing library for PHP similar to <a title=\"What is GD\" href=\"https:\/\/php.net\/manual\/en\/intro.image.php\" target=\"_blank\" rel=\"noopener\">GD<\/a>. It supports more file types and image transformations than GD.<\/p>\n\n\n\n<ol>\n<li><\/li>\n<\/ol>\n\n\n\n<ol>\n<li>Install <a href=\"https:\/\/imagemagick.org\/script\/download.php\" target=\"_blank\" rel=\"noopener\" title=\"Installation instructions\">ImageMagick<\/a> software suite and <a href=\"https:\/\/pecl.php.net\/package\/imagick\" target=\"_blank\" rel=\"noopener\" title=\"Download imagick\">imagick<\/a> library.<\/li>\n\n\n\n<li><a href=\"https:\/\/twitter.com\/cscart\/status\/577725258532257792\" target=\"_blank\" rel=\"noopener\" title=\"CS-Cart Tips on Twitter\">Clear your thumbnails cache<\/a>.<\/li>\n\n\n\n<li>Change the library name in the <em>config.local.php<\/em> file:<\/li>\n<\/ol>\n\n\n\n<p>&#8216;image_resize_lib&#8217; =&gt; &#8216;imagick&#8217;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Enable_APCu_and_Redis\"><\/span>Enable APCu and Redis<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><strong>APCu<\/strong> is a caching technology that stores (i.e., caches) data generated by CS-Cart. Once the data has been cached, CS-Cart retrieves it from the cache when needed. Retrieving data from the cache is faster than generating it again.<\/p>\n\n\n\n<p><strong>Redis<\/strong> is another data caching technology. It caches data into RAM, so that it&#8217;s quickly accessed. We recommend that you use Redis for <a href=\"https:\/\/www.w3schools.com\/php\/php_sessions.asp\" target=\"_blank\" rel=\"noopener\" title=\"What is a PHP session\">PHP sessions<\/a>. This combination of APCu and Redis is a cornerstone of effective <a href=\"https:\/\/www.cs-cart.com\/blog\/several-server-tweaks-and-recommendations-to-get-maximum-speed-out-of-cs-cart-and-multi-vendor\/\" title=\"\">CS-Cart speed optimization<\/a>.<\/p>\n\n\n\n<p>Install <a title=\"Download APCu\" href=\"https:\/\/pecl.php.net\/package\/APCu\" target=\"_blank\" rel=\"noopener\">APCu<\/a> and <a title=\"Install Redis\" href=\"https:\/\/redis.io\/topics\/quickstart\" target=\"_blank\" rel=\"noopener\">Redis<\/a> to speed up CS-Cart 4.3.1. Then modify the lines in the <em>config.local.php<\/em> file as follows:<\/p>\n\n\n\n<p>$config[&#8216;cache_backend&#8217;] = &#8216;apc&#8217;;<br \/>$config[&#8216;session_backend&#8217;] = &#8216;redis&#8217;;<\/p>\n\n\n\n<p>Check the CS-Cart Forum for <a href=\"https:\/\/forum.cs-cart.com\/t\/get-maximum-out-of-4-3-1-the-best-server-configuration\/28301\" target=\"_blank\" rel=\"noopener\" title=\"CS-Cart Forum\">more tips on configuring your server<\/a>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>We hope these tweaks will help you get the maximum speed out of CS-Cart 4.3.1. You are welcome to ask any questions about server configurations here or on the <a href=\"https:\/\/forum.cs-cart.com\/t\/get-maximum-out-of-4-3-1-the-best-server-configuration\/28301\" target=\"_blank\" rel=\"noopener\" title=\"CS-Cart Forum\">forum<\/a>.<\/p>\n\n\n\n<p>Follow CS-Cart on <a title=\"CS-Cart on Facebook\" href=\"https:\/\/www.facebook.com\/cscart.official\" target=\"_blank\" rel=\"noopener\">Facebook<\/a> and <a title=\"CS-Cart on Twitter\" href=\"https:\/\/twitter.com\/cscart\" target=\"_blank\" rel=\"noopener\">Twitter<\/a> to stay in touch with CS-Cart news.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CS-Cart 4.3.1 is now available. We\u2019ve done a solid piece of work to speed it up. CS-Cart 4.3.1 is fast<\/p>\n","protected":false},"author":31003,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6,5],"tags":[],"aioseo_notices":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.cs-cart.com\/blog\/wp-json\/wp\/v2\/posts\/5067"}],"collection":[{"href":"https:\/\/www.cs-cart.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cs-cart.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cs-cart.com\/blog\/wp-json\/wp\/v2\/users\/31003"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cs-cart.com\/blog\/wp-json\/wp\/v2\/comments?post=5067"}],"version-history":[{"count":0,"href":"https:\/\/www.cs-cart.com\/blog\/wp-json\/wp\/v2\/posts\/5067\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.cs-cart.com\/blog\/wp-json\/wp\/v2\/media?parent=5067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cs-cart.com\/blog\/wp-json\/wp\/v2\/categories?post=5067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cs-cart.com\/blog\/wp-json\/wp\/v2\/tags?post=5067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}