How To Install Memcached with PHP on Ubuntu

by Ismail.EL
0 comment

How To Install Memcached with PHP on Ubuntu

1. About Memcached :

memcached is a high-performance, distributed memory object caching system, generic in nature, but originally intended for use in speeding up dynamic web applications by alleviating database load.

2. Install memcached:

Step 1. First of all make sure that all packages are up to date.

Step 2.  Install Memcached.

Execute the following commands to install memcached:

Step 3. Configuration Memcached.

The default configuration file can be found at:

When started, Memcached will start on port 11211 by default per the default configuration file:

# Default connection port is 11211
-p 11211

Exit and save the configuration file, and then restart Memcached:

3. Installing Memcached extension for PHP :

You can install memcached extension by typing:

Now, we can restart Apache so that the changes take place:

To test PHP, create a test file named info.php with he content below. Save the file, then browse to it to see if PHP is working:


Now access info.php on web interface at http://localhost/info.php and search for Memcache, You will get result like below.

4 Conclusion

In this post, i have explained How To Install Memcached with PHP on Ubuntu
If you have any questions or feedback, feel free to leave a comment.
As always, if you found this post useful, then click like and share it 🙂

21490cookie-checkHow To Install Memcached with PHP on Ubuntu

Related Posts

Leave a Comment