Object Cache: Redis
Introduction
An object cache can help speed up database queries by caching the results of those queries in memory. One of the most popular object cache is MemCached. Support for this is included as part of the base WPCloudDeploy plugin. An additional object cache option is REDIS – we support this via an add-on.
To install the add-on, just upload and activate it just like you would any other WordPress plugin via the WordPress PLUGINS->ADD NEW screen.
Once the add-on has been uploaded and activated you should see it as a new option in your SERVER screen(s):
Enabling Redis
To enable Redis, the package first needs to be installed at the server level. Once it’s installed, you can then enable it on a site-by-site basis.
Install the Redis Package
- Go to WPCloudDeploy → All Cloud Servers
- Click on the server where you’ll be installing Redis
- Scroll down to the REDIS section
- Click the Install Redis button
A popup will appear that will offer periodic feedback as the process progresses. When the process is complete you will get a popup confirmation message and the black ‘terminal” window will show the actions that were taken while attempting to install the package.
Activate Redis For A Site
Once Redis has been installed on a server you can activate it for any site on the server.
- Go to WPCloudDeploy → All Apps
- Click on the site where you need to turn on the object cache
- Click on the Cache tab
- Scroll down to the REDIS section
- Click on the toggle switch
After a while the screen will refresh – if the operation is successful. If the operation fails, you’ll get a popup message.
You can view a full log of the operation under the SSH LOG screen.
REDIS vs MemCached
Amazon AWS has an article that outlines some of the differences between REDIS and MEMCACHED. Most of these differences do not matter in WordPress because the REDIS cache plugin doesn’t take advantage of them. MemCached uses a multi-threaded architecture which can be useful on a multi-core VM. But REDIS, in general, is more flexible.
In WordPress, MemCached can only use a max size of 1 MB for an object. Sometimes, WordPress objects in MemCached are larger than 1 MB because the options table is just HUGE. This will cause MemCached to actually SLOW DOWN or TIMEOUT your WP site. Redis is substantially better in theses situations.
Generally, given a choice between REDIS and MEMCACHED, we’ll choose REDIS.
More Topics In Admin
-
Restoring From AWS S3 Into A New Site or Server -
Backups With AWS S3 -
Restoring From Backup -
6G Firewall -
7G Firewall -
Native Linux Cron -
Disabling Sites -
Password Protect A Site (HTTP Authentication) -
Remove/Delete Site -
Manage PHP Options -
Add A WordPress Administrator -
Notifications -
Managing WordPress DEBUG Flags -
Object Cache: MemCached -
Monit / Healing -
DNS Integration: CloudFlare -
Adding Custom NGINX Configs -
Custom Servers (Bring Your Own Server) -
How To Change The IP Address For Your Server -
Virtual Cloud Providers -
Monitorix -
PHPMyAdmin – Database Operations -
Using Remote Databases -
SMTP Gateway -
Server Updates -
Theme & Plugin Updates -
Bulk Actions on Servers -
Bulk Actions on Sites -
SSH Key Overrides -
Webserver Types -
WPCD Cron Jobs -
Disk Quotas -
Using Post-Processing Custom Bash Scripts -
Copy To Server (Automated Daily Process) -
Bootstrapping A WordPress Server With Our Scripts -
Bootstrapping A WordPress Server With Our Scripts – Archive Version 4.x