Memcached installation in Plesk gives us access to a powerful and cost-free object caching system to enhance website performance.

As part of our Plesk Hosting Support Service, Bobcares responds to all inquiries, no matter how trivial.

Let’s examine the how our Support team install memcached in Plesk.

Memcached installation in Plesk

Memcached is a high-performance, distributed memory caching system that is free and open source with the goal of accelerating dynamic web applications by minimising database load. Basically, it is a key-value dictionary of strings, objects, and other data that was rendered from a page, an API call, or a database call and is kept in memory.

plesk install memcached

Memcached won’t function unless the daemon, PHP libraries, and our PHP application are installed and configured correctly.

Steps to install Memcached

Generally, we use the command line to install the PHP libraries for Memcached. So, to execute these commands, we must be log in as the root user.

  1. Firstly, establish an SSH connection to a Plesk server and set up the environment.

    on CentOS/RHEL

    yum install make memcached gcc libmemcached-devel zlib-devel plesk-php*-devel

    on Debian/Ubuntu


    apt install memcached autoconf automake gcc libmemcached-dev libhashkit-dev pkg-config plesk-php*-dev zlib1g-dev make
  2. Then, install the memcached PHP extension.
    /opt/plesk/php/7.4/bin/pecl install memcached
  3. They, need additional parameters during installation. So, to install memcached with default settings or to enter required values, press Enter after each option.

    libmemcached directory [no] :

    zlib directory [no] :

    use system fastlz [no] :

    enable igbinary serializer [no] :

    enable msgpack serializer [no] :

    enable json serializer [no] :

    enable server protocol [no] :

    enable sasl [yes] :

    enable sessions [yes] :

  4. Then, register the extension in the PHP configuration file.
    echo "extension=memcached.so" > /opt/plesk/php/7.4/etc/php.d/memcached.ini
  5. Update the information on PHP handlers:
    plesk bin php_handler --reread
  6. Then, restart the PHP-FPM service.
    service plesk-php74-fpm restart
  7. Then, restart the Apache service:

    on CentOS/RHEL

    service httpd restart

    on Debian/Ubuntu

    service apache2 restart
  8. Finally, make sure the memcached module is installed:
    /opt/plesk/php/7.4/bin/php -m | grep memcached

[Looking for a solution to another query? We are just a click away.]

Conclusion

To sum up, we can install Memcached to enhance the performance of our website. Above all it is a powerful and free object caching system. How to install Memcached in Plesk is demonstrated by our Support team.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED