Memcached is a high-performance, distributed memory object caching system. It acts as an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering. Memcached can improve the speed of your website or application by providing quick access to frequently accessed data. More information about it is available in the official Memcached documentation.
Important: If you do not have a WebApps section in the Control Panel of your account, then this tutorial is not suitable for your particular hosting environment. You can get in touch with us if you need further assistance.
This tutorial will show you how to install and use Memcached from within a web application in a few simple steps:
If you follow this guide, Memcached will be accessible at /home/example/private/memcached/memcached.sock as a socket for Memcached on your website or in your application. You will need to replace example with the actual username of your hosting account.
Memcached is available by default for some hosting plans. You can check if it is available for your account by running the following command via SSH:
telnet localhost 11211
If Memcached is available by default for your account, a message "Connected to localhost." will be displayed, which means that Memcached works at localhost (with IP address 127.0.0.1) on the default Memcached port (11211). To cancel the test connection to the Memcached server, you can type the "quit" command (without the quotes) and press Enter.
To install Memcached on your account as a web application via SSH, follow these steps:
You can install Memcached in a web application using the hosting Control Panel > WebApps section.
After you install Memcached in a web application, you need to enable support for Memcached in the PHP scripts of your website. To do this, you should go to the PHP settings section of your hosting Control Panel and press the Manage button for the corresponding subdomain (www is the subdomain for the main website). This will take you to the management page for its PHP settings where you need to select the "Memcached" extension and press the Save button.
The last step to use Memcached is to activate it in your scripts or website. All you need to do is define the path to the Memcached socket in the Memcached settings of your script or software application. If your username is example and you installed Memcached in the /private/memcached/ directory of your account, your Memcached socked will be:
/home/example/private/memcached/memcached.sock
Detailed instructions on activating Memcached should be available in the official documentation of the script or software application that you use. If such information is not available, you should contact the developers or vendors of these scripts or software applications for further assistance.
To use Memcached on WordPress, you need to install a plugin that offers support for Memcached. One such plugin is LiteSpeed Cache. After it is installed on your website, you need to:
After the settings are saved, the information under Status should indicate that the Memcached extension is enabled and the connection test passed.
To enable support for Memcached caching on Joomla version 5, follow these simple steps:
All prices are in USD. No setup fees. Minimum contract period for shared hosting services - 12 months. Full prepayment for the contract period. 100-day money-back guarantee. No automatic renewal. Fees for domain registrations and SSL certificates cannot be refunded in case of an early contract termination.
ICDSoft 2001-2024 © All rights reserved
Terms of Use
|
Legal notice
|
Privacy
|
Reseller terms