Redis Workaround for ACF issues

Last Updated -


Currently Advanced Custom Fields does not work with the Pagely Redis (object-cache.php) file. See this article: Advanced Custom Fields Pro and Object Cache Compatibility

A workaround is to use a plugin within the WP repo and modify the wp-config.php file for the app with some define statements. This article is not publicly available since if the customer installs the plugin without adding the defines, it can take down all sites on the VPS because we use port 6379 by default. 

1.) Define the Redis Port and Cache Key

Edit the wp-config.php file for the app you are working on. Add the define for the Redis port and the cache key. The cache key has to be unique for each app. Two apps can not share the same cache key.

define('WP_REDIS_PORT', 6380);
define('WP_CACHE_KEY_SALT','wrtqa-wordpress');

2.) Install the Redis-Cache Plugin

Here is the link to the plugin:

https://wordpress.org/plugins/redis-cache/

You can install it via the WP dashboard or using the following command via the app root:

sudo -u www-data wp plugin install redis-cache 

3.) Activate the Plugin and Verify the Redis Port/Cache Key are Correct

Log into the WP dashboard and activate the redis-cache plugin(this can also be done via command line). Once the plugin is activated go to Settings --> Redis on the left panel of the dashboard. In this section, verify the port is 6380 and that your cache key prefix is set. Once everything looks good, click "Enable Object Cache"

Screen_Shot_2017-12-07_at_10.23.17_AM.png

Related Topics

Pagely is the Managed WordPress Hosting Platform designed to exceed the needs of media, business, and Enterprise customers alike. We help the world's biggest brands scale WordPress.

Copyright © 2006-2017 Pagely, Inc. All rights reserved.
Pagely® and WordPress® are registered trademarks.

Pagely
Powered by Zendesk