®Magento Tutorials

Magento how to configure and use Memcached

To configure and use Memcached with Magento, you can follow these steps:

Install and configure Memcached on your server:

On Ubuntu, you can install Memcached by running sudo apt-get install memcached
On CentOS, you can install Memcached by running sudo yum install MemcachedAfter installation, you can configure Memcached by editing the configuration file located at /etc/memcached.conf

Install the Memcached extension for PHP:

On Ubuntu, you can install the extension by running sudo apt-get install php-memcached
On CentOS, you can install the extension by running sudo yum install php-pecl-memcached

Configure Magento to use Memcached:

In your Magento admin panel, go to Stores > Configuration > Advanced > System > Cache Management
Select Memcached from the Caching Application dropdown menu
Enter the server details and port number for your Memcached instance
Save the configuration and flush Magento’s cache

Verify that Magento is using Memcached:

You can check the statistics for your Memcached instance to see if it is being used by Magento. For example, by running memcached-tool stats
You can also check the Magento cache status by going to Stores > Cache Management and verifying that the cache type is set to Memcached.

Note: Make sure your Memcached server and PHP are compatible, also check the Magento version you are running. Some additional steps might be required depending on your setup.

flush’ in the Magento root directory.

Verify that Memcached is working by running the command ‘memcached-tool stats’

Now, the Memcached is configured and can be used for caching in Magento. You can check the cache storage usage in the backend by navigating to ‘System’ -> ‘Cache Management’ in the Magento admin panel.

Note: To improve the performance, it is recommended to use Memcached as a caching backend in Magento 2.

About zohaibk

We develop useful addons for #E-Commerce and #CRM software to provide extra features.#PrestaShop,#Magento,#SugarCRM,#Vtiger & #Android #apps
View all posts by zohaibk →