Five Server Tweaks to Get Maximum Speed out of CS-Cart 4.3.1

CS-Cart 4.3.1 is now available. We’ve done a solid piece of work to speed it up.

CS-Cart 4.3.1 is fast because it’s well-optimized, but the speed also depends on the server configuration.

We’ve prepared five server tweaks that will help you get the maximum speed boost from CS-Cart 4.3.1.

Before tweaking, check if your server has all the required libraries and modules:

  1. Create the phpinfo.php file in your server’s root directory.
  2. Open the file via any text editor and type this code:
  3. <?php
    phpinfo();
    ?>

  4. Save the changes and close the file.
  5. Visit the URL of the phpinfo.php file in your web browser. For example: http://localhost/phpinfo.php. You will see the detailed information about your PHP version, installed modules, libraries, and more.
  6. Press CTRL + F (Command + F for Mac) and type the library or module name.
  7. If you can’t find a library or a module, your server doesn’t have it. Before tweaking, install missing libraries and modules.

Use PHP 5.6

CS-Cart 4.3.1 works faster with PHP version 5.6. Update PHP on your server to 5.6 to accelerate your store.

Enable OPcache

Use the OPcache caching engine to speed up PHP scripts.

Every time the PHP interpreter runs a PHP script, it compiles the script into what’s called byte code. 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.

CS-Cart 4.3.1 uses OPcache by default if you have it installed and enabled.

Install mod_deflate

The mod_deflate 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.

Ask you hosting provider if the server has mod_deflate.

Use Imagick

Imagick is an image processing library for PHP similar to GD. It supports more file types and image transformations than GD.

    To use the Imagick library, complete these steps:

  1. Install ImageMagick software suite and imagick library.
  2. Clear your thumbnails cache.
  3. Change the library name in the config.local.php file:
  4. 'image_resize_lib' => 'imagick'

    Enable APCu and Redis

    APCu 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.

    Redis is another data caching technology. It caches data into RAM, so that it’s quickly accessed. We recommend that you use Redis for PHP sessions.

    Install APCu and Redis to speed up CS-Cart 4.3.1. Then modify the lines in the config.local.php file as follows:

    $config['cache_backend'] = 'apc';
    $config['session_backend'] = 'redis';

    Check the CS-Cart Forum for more tips on configuring your server.


    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 forum.

    Follow CS-Cart on Facebook and Twitter to stay in touch with CS-Cart news.

    Follow CS-Cart news & promotions

One Response to “Five Server Tweaks to Get Maximum Speed out of CS-Cart 4.3.1”

  1. Gurdji says:

    Can the cs cart load in 1 to 3 maximum seconds. What server configuration do you recommend for 20.000 products