How to Set Up a Persistent Object Cache in WordPress

⏲️ Estimated reading time: 2 min

How to Set Up a Persistent Object Cache in WordPress

Setting up a persistent object cache depends on your hosting environment and whether your server supports Redis or Memcached. Follow these steps to enable object caching efficiently.


1. Check If Your Hosting Provider Supports Object Caching

Before proceeding, check with your hosting provider. Many managed WordPress hosts (e.g., Kinsta, WP Engine, SiteGround, Cloudways) already have Redis or Memcached enabled.

  • If your host provides a built-in object cache, enable it from their control panel.
  • If not, follow the manual setup below.

2. Install a WordPress Object Cache Plugin

Option 1: Redis Object Cache (Recommended)

0️⃣ Install and activate the “Redis Object Cache” plugin.

  • Go to Plugins > Add New and search for Redis Object Cache.
  • Install and activate the plugin.

1️⃣ Enable Redis

  • Go to Settings > Redis and click Enable Object Cache.

2️⃣ Confirm It’s Working

  • You should see Connected to Redis in the settings page.

👉 If Redis is not installed on your server, follow the manual setup below.


Set Up a Persistent Object Cache in WordPress

3. Install Redis on Your Server (Manual Setup)

If your hosting doesn’t support Redis by default, you need to install it manually.

For Ubuntu/Debian Servers (VPS, Cloud Hosting)

  1. Log in to your server via SSH ssh your-user@your-server-ip
  2. Install Redis sudo apt update sudo apt install redis-server -y
  3. Enable Redis and Start the Service sudo systemctl enable redis sudo systemctl start redis
  4. Test If Redis Is Running redis-cli ping If it returns PONG, Redis is running correctly.
  5. Configure Redis for WordPress
    Open the Redis configuration file: sudo nano /etc/redis/redis.conf
    • Find supervised no and change it to: supervised systemd
    • Save and exit (CTRL+X, then Y and Enter).
  6. Restart Redis sudo systemctl restart redis

4. Enable Redis in WordPress

If you haven’t already, install the Redis Object Cache plugin, go to Settings > Redis, and enable the cache.


Alternative: Memcached Setup

If you prefer Memcached, install it instead:

sudo apt update
sudo apt install memcached -y
sudo systemctl enable memcached
sudo systemctl start memcached

Then use the WP-FFPC plugin or another Memcached-compatible plugin.


5. Verify Persistent Object Cache Is Working

  1. Go to Tools > Site Health in WordPress.
  2. Look for a message saying “Persistent object caching is enabled.”
  3. If everything is working, your site should now load faster! 🚀

Let me know if you need help with anything! 😊

Report an issue (max 5 words):

Only logged-in users can submit reports.


Discover more from HelpZone

Subscribe to get the latest posts sent to your email.

Want to support us? Let friends in on the secret and share your favorite post!

Photo of author

Flo

How to Set Up a Persistent Object Cache in WordPress

Published

Update

Welcome to HelpZone.blog, your go-to hub for expert insights, practical tips, and in-depth guides across technology, lifestyle, business, entertainment, and more! Our team of passionate writers and industry experts is dedicated to bringing you the latest trends, how-to tutorials, and valuable advice to enhance your daily life. Whether you're exploring WordPress tricks, gaming insights, travel hacks, or investment strategies, HelpZone is here to empower you with knowledge. Stay informed, stay inspired because learning never stops! 🚀

👍 Like us on Facebook!

Closing in 10 seconds

Leave a Reply