> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuring Magento to use memcached

> Enhance your Magento site's performance with memcached using our simple step-by-step guide!

This article describes how to configure Magento to use memcached.

Memcached is an open-source memory object caching system that web sites can use to help accelerate page load times. Memcached works by caching in RAM frequently accessed data, such as the results of API calls, database calls, and more.

<Note>
  * If you have a managed VPS or managed Dedicated Server, please open a support ticket on the Hosting Panel at [https://my.hosting.com](https://my.hosting.com) and request memcached for your system. We will install it for you.

  * If you have an unmanaged VPS, you can install memcached yourself.

  * Memcached is not supported on non-Turbo shared hosting accounts at this time.
</Note>

## Enabling memcached for Magento 2

To enable memcached for Magento 2, you must change some settings in the *env.php* file. To do this, follow these steps:

1. Using your preferred text editor, navigate to the directory where you installed Magento, and then open the *app/etc/env.php* file.

2. Locate the following section in the *env.php* file:

```
'session' => [
  'save' => 'files'
],
```

3. Modify this section as follows:

```
'session' => [
  array (
    'save' => 'memcached',
    'save_path' => '127.0.0.1:11211'
  ),
],
```

4. Save your changes to the *env.php* file. Memcached is now enabled.

<Tip>
  For additional information about how to configure memcached with Magento 2, please visit [http://devdocs.magento.com/guides/v2.0/config-guide/memcache/memcache\_magento.html](http://devdocs.magento.com/guides/v2.0/config-guide/memcache/memcache_magento.html).
</Tip>

## Enabling memcached for Magento 1.9 and older versions

To enable memcached for Magento 1.9 and older versions, you need to add some settings to the  *local.xml* file. To do this, follow these steps:

1. Using your preferred text editor, navigate to the directory where you installed Magento, and then open the *app/etc/local.xml* file.

2. Add the following lines just *before* the closing **\</global>** tag:

<Warning>
  **Important**

  If these lines are not contained in the **\<global>** section, Magento will not use memcached.
</Warning>

3. Save your changes to the *local.xml* file. Memcached is now enabled.

## More information

* For more information about memcached, please visit [http://www.memcached.org](http://www.memcached.org).

* To view the official Magento documentation, please visit [http://www.magentocommerce.com/knowledge-base](http://www.magentocommerce.com/knowledge-base).
