Overview
This article describes various resources you can use to enable object caching, including the Docket Cache — Object Cache Accelerator plugin.
Background
As part of the WordPress 6.1 release, the WordPress Performance Team has added two Site Health checks:
The new Site Health checks first determine if the site is using a Persistent Object Cache. If a certain site resource threshold is met, you may see a notice suggesting that a Persistent Object Cache be enabled. See this WordPress article for more information.
With WordPress, exporting the PHP objects is an advanced step, as most plugins that implement file-based solutions will serialize and unserialize the object to store and retrieve the data. The Docket Cache — Object Cache Accelerator plugin can help you accomplish this.
How to configure the Docket Cache plugin
The following sections explain how to install and use this plugin.
Installing the plugin
- Log in to your WordPress site.
- Navigate to the Plugins > Add New.
- Search for the Docket Cache — Object Cache Accelerator plugin.
- Install and activate the plugin.
Using the plugin
The Docket Cache — Object Cache Accelerator plugin automatically implements Object Cache after it's activated. There are also a few key features and requirements to be aware of when using the plugin as described below.
Jetpack
-
The Docket Cache — Object Cache Accelerator plugin provides an optimization feature called Deactivate XML-RPC / Pingbacks that is enabled by default.
Jetpack needs the xmlrpc.php file to be accessible, or it won't be able to connect to your WordPress site.
If Jetpack cannot connect to your WordPress site
Proceed with the following steps to disable this option.
-
Add the following line in your site's wp-config.php file to disable this option:
define('DOCKET_CACHE_PINGBACK', false);
- Navigate to Docket Cache > Configuration > WP TWEAKS.
- Toggle the Deactivate XML-RPC / Pingbacks setting to Disable.
-
Add the following line in your site's wp-config.php file to disable this option:
OPcache
-
One of the server requirements for the Docket Cache — Object Cache Accelerator plugin is the PHP module OPcache. Depending on your hosting plan, you may need to manually enable this:
- Shared Hosting and DreamPress plans — This option is enabled by default.
- VPS and Dedicated hosting plans — This option must be enabled manually in your DreamHost panel. See this article for instructions on how to enable OPcache.
Cronbot service
-
Cronbot is an external service that pings your website every hour to keep the WordPress Cron service running. This is enabled by default; however, DreamHost does not recommend using this feature.
Disable WP-CRON and create a Cron Job in your panel
It's recommended that you disable WP-CRON and then configure a Cron Job in your DreamHost panel. See this article for instructions on how to disable WP-CRON.
Disable Cronbot
To disable this service, add the following line in your site's wp-config.php file:
define('DOCKET_CACHE_CRONBOT', false);
You can then toggle this setting by navigating to Docket Cache > Configuration > FEATURE OPTIONS.
Flushing cache
-
When making changes and updates to your WordPress site, you should purge the cache so that changes can be displayed publicly on the site.
You can purge the cache within the Docket Cache — Object Cache Accelerator plugin by navigating to the Overview tab and clicking the Flush Object Cache and Flush OPcache buttons.
If you have a separate caching plugin, or if your theme has its own caching feature, it must be purged separately.
Documentation
-
Docket Cache also provides numerous features that are helpful for general WordPress management. These features are not exclusive to caching and are helpful for general troubleshooting, testing, and WordPress management. View the following link for further information.
Object caching alternatives
Object Caching alternatives such as Redis or Memcached can be used instead. Redis Object Cache is available on DreamPress Pro plans. You can also install it manually on a Dedicated Server or DreamCompute, as those plans allow sudo access. See this article for more information about Redis Object Cache.