You can significantly speed up your Joomla site by using Memcached. This powerful caching system stores frequently accessed data in memory, reducing database load and improving page load times.
Looking for reliable Joomla hosting? KamHost offers optimized Joomla hosting plans with Memcached pre-configured and ready to use. [Learn more about our Joomla hosting →]
Prerequisites
Before you begin, make sure:
- ✅ Memcached is enabled on your hosting account – How to Enable Memcached on Your Hosting Plan
- ✅ You have FTP or file manager access to your Joomla site’s root folder
- ✅ You have administrator access to your Joomla admin panel
Step 1: Edit the Joomla Configuration File
To enable Memcached on Joomla, you need to modify a few settings in your Joomla configuration.php file first.
Locate the File
You can find this file in your Joomla site’s root folder (usually /www/yourdomain.com/ or the folder where Joomla is installed).
Edit the File
Using your favorite FTP software or the File Manager in your hosting control panel:
- Open the
configuration.phpfile for editing. - Find the following lines:
php
public $caching = '0'; public $cache_handler = 'file';
- Change these lines to:
php
public $caching = '2'; public $cache_handler = 'memcache';
- Immediately after the two lines you edited, add these two lines:
php
public $memcache_server_host = '/home/sys/memcached.sock'; public $memcache_server_port = '0';
- Save the file and close it.
Note: This guide is written for KamHost hosting, which uses a Unix socket for Memcached connections. If your hosting provider uses a different socket path or TCP/IP instead of a socket, replace
/home/sys/memcached.sockwith your specific host details (e.g.,127.0.0.1and port11211).
Step 2: Configure Memcached in Joomla Settings
Now, we’ll configure Memcached in your Joomla site’s admin panel.
- Log in to your Joomla admin panel.
- Navigate to System → Global Configuration.
- Click on the Server tab at the top.
- Scroll down to Cache Settings.
- From the drop-down menu, select Persistent (Memcached).
- Enter your Memcached server details:
| Setting | Value |
|---|---|
| Memcache(d) Server Host | /home/sys/memcached.sock |
| Memcache(d) Server Port | 0 |
- Click Save at the top to apply your changes.
Step 3: Verify Memcached Is Working
To confirm Memcached is active on your Joomla site:
- Visit your Joomla site’s frontend and browse a few pages.
- Check if pages load faster – you should notice improved performance.
- You can also check your hosting control panel’s Memcached statistics to see cache hits.
Need help? If you’re unsure whether Memcached is working, contact our support team.
Troubleshooting
| Issue | Solution |
|---|---|
| Memcached option not showing | The Memcached extension isn’t enabled on your server. Contact support. |
| Site breaks after changes | Check your configuration.php for syntax errors and revert to backup. |
| No performance improvement | Verify your Memcached server host and port are correct. |
| Connection refused error | Memcached service may not be running. Contact your hosting provider. |
Benefits of Using Memcached on Joomla
| Benefit | Impact |
|---|---|
| 🚀 Faster page loads | Pages load up to 5x faster with cached data |
| 📉 Reduced server load | Fewer database queries = better server performance |
| 📈 Handle more traffic | Serve more visitors without slowing down |
| ⚡ Better user experience | Faster sites keep visitors engaged |
Get Started with KamHost Joomla Hosting
Ready to take your Joomla site to the next level? KamHost offers high-performance Joomla hosting with Memcached pre-installed and ready to enable.
- ✅ Free Memcached instances on all plans
- ✅ 24/7 Joomla expert support
- ✅ One-click Joomla installation
- ✅ Optimized servers for Joomla performance
[Explore KamHost Joomla Hosting Plans →]
Conclusion
You’ve successfully enabled Memcached on your Joomla website! By following these steps, you’ve improved your site’s performance, reduced server load, and created a better experience for your visitors.
Need Help?
If you have questions about enabling Memcached on your Joomla site, our support team is here to help:
- Log in to your KamHost hosting control panel.
- Go to Help Center → My Tickets.
- Submit a ticket with your query.
We’ll get back to you as soon as possible.
