Website Help
How to use Memcached for Drupal 8.x and above?

How to use Memcached for Drupal 8.x and above?

To enable Memcache for Drupal you have to download the Drupal Memcache API and Integration module.

Go to your Drupal admin panel > Extend > Install New Module button.

Click Choose file and select the file you have downloaded. Click Install.

After installing and enabling the module, you should activate Memcache and Memcache Admin by clicking on Extend and scrolling down until you find the modules.

Select the checkmark next to both modules and again click on the Install button at the bottom of the page.

Then, using Site Tools > File Manager or using an FTP Client make sure you change the permissions of the file located at ~/www/yourdomain.com/public_html/sites/default/settings.php to 644. After that open the same file and add the following lines at the bottom:

$settings['memcache']['servers'] = ['' => 'default'];
$settings['memcache']['bins'] = ['default' => 'default'];
$settings['memcache']['key_prefix'] = '';
$settings['cache']['default'] = 'cache.backend.memcache';

Save the file and now your Drupal should be properly configured to use the Memcached service.

Share This Article