Memcached is a key-value store to cache the dynamic database calls and stores them in memory. This reduces the database load helps in speeding up the dynamic database driven websites.

In this guide you are going to learn how to install and configure Memcached in your server alongside with Apache and PHP on Ubuntu 20.04.

Best Hosting for your Business


  • Install Apache on your server.
  • Install PHP 8 on your server.

Update your server packages to the latest.

sudo apt update sudo apt upgrade -y

Install Memcached

Make sure you have followed the prerequisites guides to install Apache and PHP 8.

Memcached is available by default in the Ubuntu 20.04 repository.

sudo apt install memcached libmemcached-tools -y



Install and Configure Memcached with Apache and PHP
2.65 GEEK