Memcached is a high‑performance, distributed memory caching system that speeds up Magento by storing frequently accessed data in RAM. On ruachost.com, you can configure Magento to use Memcached for sessions and caching to improve page load times.

 

Why Use Memcached?

  • Reduces database load by caching queries and objects.

  • Improves site speed and scalability.

  • Ideal for busy Magento stores with high traffic.

 

Steps to Configure Magento with Memcached

Step 1: Ensure Memcached is Available

  • On Managed VPS/Dedicated Servers → Memcached can be installed by Ruachost support.

  • On Unmanaged VPS → Install Memcached manually via SSH (yum install memcached or apt-get install memcached).

  • ❌ Memcached is not supported on non‑Turbo shared hosting accounts.

 

Step 2: Configure Magento 2 to Use Memcached

  1. Log in via SSH.

  2. Navigate to your Magento installation directory:

    Bash
    
    cd ~/public_html
    

     

  3. Open the app/etc/env.php file in a text editor.

  4. Locate the session configuration section:

    'session' => [
        'save' => 'files',
    ],
    
  5. Modify it to use Memcached:

    'session' => [
        'save' => 'memcached',
        'save_path' => '127.0.0.1:11211',
    ],
    
  6. Save changes. ✅ Magento will now use Memcached for session storage.

 

Step 3: Configure Magento 1.9 and Older Versions

  1. Log in via SSH.

  2. Navigate to your Magento installation directory.

  3. Open the app/etc/local.xml file in a text editor.

  4. Add the following lines inside the <global> section:

    <session_save><![CDATA[memcached]]></session_save>
    <session_save_path><![CDATA[127.0.0.1:11211]]></session_save_path>
    
  5. Save changes. ✅ Magento will now use Memcached for session storage.

 

Important Notes

  • Always back up your site before editing configuration files.

  • Replace 127.0.0.1:11211 with the correct host and port if Memcached runs on a different server.

  • For advanced setups, you can configure Memcached for page caching as well.

Bu cevap yeterince yardımcı oldu mu? 0 Bu dökümanı faydalı bulan kullanıcılar: (0 Oy)

Powered by WHMCompleteSolution