Object Caching and Redis (Firstserv Guide)
What is Object Caching?
Object caching is a performance optimisation technique that stores the results of frequent or resource-intensive database queries in memory.
Instead of repeatedly querying the database for the same information, the system can retrieve it instantly from the cache.
Benefits of Object Caching
- Faster page load times
- Reduced database workload
- Improved scalability for high-traffic sites
- Better performance for dynamic content (e.g. WooCommerce, membership sites)
What is Redis?
Redis (Remote Dictionary Server) is an open-source, in-memory data store commonly used for caching.
It works by storing data directly in memory rather than on disk, making it extremely fast to access.
Redis supports multiple data types such as:
- Strings
- Lists and sets
- Hashes
- Advanced structures for efficient data handling
In practical terms, Redis acts as a high-speed cache layer, working alongside your database (MySQL/MariaDB) to improve application performance.
Enabling Redis on Firstserv Hosting
Redis is typically available on higher-tier or premium hosting plans. Please refer to our separate guide on enabling Redis for your specific plan before proceeding.
How to Enable Object Caching in LiteSpeed Cache (WordPress)
Once Redis is active on your hosting account, you can enable object caching in your WordPress site using the LiteSpeed Cache plugin.
Step 1: Get Your Redis Socket Path
- Log in to cPanel
- Navigate to the Advanced section
- Open Redis Manager
- Copy the Socket Path (e.g.
/var/kredis/.../redis.sock)
Step 2: Configure LiteSpeed Cache
- Log in to your WordPress dashboard
- Go to LiteSpeed Cache → Cache
- Open the Object tab
Step 3: Enable Object Cache
Update the settings as follows:
- Object Cache: ON
- Method: Redis
- Host: Paste the Redis socket path you copied
- Port:
0(required when using a UNIX socket)
Step 4: Save Settings
- Click Save Changes
✅ Object caching is now enabled using Redis.
Key Notes
- Redis uses a UNIX socket, so the port must be set to
0 - Ensure LiteSpeed Cache is installed and active before configuring
- Only one object caching method should be enabled at a time
Summary
By combining Redis with LiteSpeed Cache, you can:
- Dramatically improve WordPress performance
- Reduce database load
- Enhance responsiveness for dynamic sites
If you need help enabling Redis or configuring object caching on your Firstserv hosting, our support team is always available to assist.
