Skip to content

Redis Queue - Quick Start Guide

When you use deferred mode (?defer=1), the plugin can now automatically queue jobs to Redis instead of processing them immediately. This makes it more reliable and scalable.

No! Redis is completely optional. The plugin will:

  • ✅ Use Redis if it’s available
  • ✅ Fall back to the FastCGI method if Redis is not available
  • ✅ Work exactly as before if you don’t have Redis

Nothing! If Redis is installed and running, it’s automatic.

Terminal window
php -m | grep redis
redis-cli ping
Terminal window
curl "https://example.com/wp-json/all-sites-cron/v1/run?defer=1"

If Redis is available, you’ll see:

{
"success": true,
"status": "queued",
"message": "Cron job queued to Redis for background processing",
"mode": "redis"
}
Terminal window
# Add to crontab (runs every minute)
* * * * * curl -X POST -s https://example.com/wp-json/all-sites-cron/v1/process-queue

That’s it!

Use Redis if you have:

  • ✅ Large networks (500+ sites)
  • ✅ High-frequency scheduling
  • ✅ Need for job persistence
  • ✅ Multiple web servers

Otherwise, the FastCGI method works great!

If Redis is not on localhost:

wp-config.php
add_filter( 'all_sites_cron_redis_host', fn() => 'redis.example.com' );
add_filter( 'all_sites_cron_redis_port', fn() => 6379 );

To disable Redis even if available:

add_filter( 'all_sites_cron_use_redis_queue', '__return_false' );

See REDIS-QUEUE.md for complete documentation.