keepcalculator

06 Numbers and Powers

LiteSpeed Cache Setup: Faster WordPress Site

Card No. 06·72587 · Updated · Standard formula, shown below

LiteSpeed Cache is a powerful, free WordPress plugin that can dramatically speed up your site by storing pre-generated HTML copies of your pages and serving them to visitors instantly. This guide walks you through setting up its object cache feature, which reduces database load and speeds up dynamic content. You’ll need a WordPress site hosted on a LiteSpeed web server (most shared hosts and many VPS providers use it) and access to your WordPress admin dashboard.

What You’ll Need

  • A WordPress site running on a LiteSpeed web server (check with your host or look for LiteSpeed in your hosting control panel).
  • Admin access to your WordPress dashboard.
  • An FTP client or file manager (optional, for advanced configuration).

Step-by-Step

  1. Install and activate the LiteSpeed Cache plugin. In your WordPress admin, go to Plugins → Add New, search for “LiteSpeed Cache”, and install it. Activate the plugin.
  2. Enable object cache. Go to LiteSpeed Cache → General in the left sidebar. Scroll to the “Object Cache” section and toggle the “Enable Object Cache” switch to ON. Click “Save Changes”.
  3. Choose a cache method. By default, the plugin uses a file-based cache. For better performance, switch to Memcached or Redis if your host supports them. In the same “Object Cache” section, select “Memcached” or “Redis” from the “Method” dropdown. If you’re unsure, stick with the default file cache—it works well on most setups.
  4. Configure object cache settings. Set the “Object Cache Lifetime” (default 3600 seconds is fine for most sites). Leave “Purge on Update” enabled so that when you update posts or pages, the cache is cleared for those items. Click “Save Changes” again.
  5. Verify the cache is working. Go to LiteSpeed Cache → Toolbox and click the “Object Cache” tab. You should see a status message indicating that object cache is enabled. If you see an error, check the troubleshooting section below.
  6. Test your site. Visit your homepage and a few posts. The pages should load quickly. You can also use a tool like GTmetrix or Pingdom to compare before and after speeds.

Common Mistakes

  • Enabling object cache without a compatible server. If your host doesn’t use LiteSpeed, the plugin won’t work. Check your hosting control panel or ask support.
  • Choosing Memcached or Redis without installing the required PHP extensions. If you select these methods but the server doesn’t have them, the cache won’t work. Stick with the file method unless you know what you’re doing.
  • Not saving changes after toggling the switch. The plugin won’t apply changes until you click “Save Changes”.
  • Forgetting to clear the cache after major changes. If you edit your theme or install a new plugin, clear the cache from LiteSpeed Cache → Toolbox → Purge All to see the changes.

Tips

  • Combine object cache with LiteSpeed’s page cache (which is enabled by default) for maximum speed.
  • If your site uses a plugin like WooCommerce, object cache can significantly reduce database queries, especially during checkout.
  • Monitor your site’s performance after enabling. If you notice issues, try lowering the lifetime to 1800 seconds.
  • Use a caching test plugin or query monitor to see how many database queries are reduced.

Troubleshooting

If object cache doesn’t seem to work, follow these steps:

  1. Check the status. Go to LiteSpeed Cache → Toolbox → Object Cache. If it says “Disabled”, go back to General settings and re-enable it.
  2. Verify server compatibility. Look for “LiteSpeed” in your hosting panel or ask your host. If you’re on Apache or Nginx, the plugin won’t work.
  3. Try the file method. If you selected Memcached or Redis and it fails, switch back to “File” and test again.
  4. Check PHP error logs. If you see errors, they might indicate missing extensions. Ask your host to install them.
  5. Clear all caches. Sometimes old cache files cause issues. Go to LiteSpeed Cache → Toolbox → Purge All and then re-test.
  6. Deactivate other caching plugins. If you have another caching plugin, it may conflict. Deactivate it and see if object cache starts working.

Frequently Asked Questions

Do I need object cache if I have page cache?

Page cache serves static HTML, but dynamic elements like user logins and comments still hit the database. Object cache reduces those database queries, so they complement each other.

Will object cache work on any hosting?

No, it requires a LiteSpeed web server. If your host uses Apache or Nginx, you’ll need a different caching solution like W3 Total Cache or WP Super Cache.

What is the difference between Memcached and Redis?

Both are in-memory caching systems. Redis is generally faster and supports more data types, but Memcached is simpler. Your host may only support one.

Can object cache cause issues with my site?

In rare cases, stale cache can cause outdated content to show. That’s why the plugin purges cache on updates. If you see issues, clear the cache manually.

How do I know if object cache is working?

You can check the status in the Toolbox, or use a query monitor plugin to see if database queries are reduced.

Is LiteSpeed Cache free?

Yes, the plugin is free, and the object cache feature is included. Some hosts may charge for Memcached/Redis, but the file method is free.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →