-
Notifications
You must be signed in to change notification settings - Fork 71
Advanced Queue Setup In CLI mode
Welcome to the guide on setting up an Advanced Queue in Command Line Interface (CLI) Mode for your Mailchimp integration with WooCommerce. This guide will help you understand how to optimize the queue processing system for your specific needs.
From version v2.3 onwards, the queue processing system has been switched to Action Scheduler. This guide provides instructions on how to set up an advanced queue in CLI mode, which can be more efficient and reliable for larger sites or sites with specific server configurations.
If you have any of the following constants in your wp-config.php
file, please remove them:
DISABLE_WP_HTTP_WORKER
MAILCHIMP_USE_CURL
MAILCHIMP_REST_LOCALHOST
MAILCHIMP_REST_IP
MAILCHIMP_DISABLE_QUEUE
You have two options to run the queue process using a cronjob command:
- Run it on a cron schedule every minute. Use the following command, replacing "yourdomain.com" with your actual domain, and "/full/path/to/install/" with the full path to your WordPress installation:
* * * * * /usr/bin/wp --url=http://yourdomain.com --path=/full/path/to/install/ action-scheduler run --group="mc-woocommerce"
- Use a process manager like Monit or Supervisord. The command is similar to the one above, but without the cron schedule:
/usr/bin/wp --url=http://yourdomain.com --path=/full/path/to/install/ run --group="mc-woocommerce"
For more advanced uses of the Mailchimp for WooCommerce/Action Scheduler CLI, please refer to the Action Scheduler documentation. Remember to always use the --group
option as follows: --group="mc-woocommerce"
.
If you're using a version of the plugin prior to v2.3, it's recommended to run the queue in CLI mode. First, define a constant in your config file as follows: define('DISABLE_WP_HTTP_WORKER', true);
. Then, you have two options to run this process:
- Run it on a cron schedule every minute. Use the following command, replacing "yourdomain.com" and "/full/path/to/install/" as explained above:
* * * * * /usr/bin/wp --url=http://yourdomain.com --path=/full/path/to/install/ queue listen
- Use a process manager like Monit or Supervisord. The command is similar to the one above, but without the cron schedule:
/usr/bin/wp --url=http://yourdomain.com --path=/full/path/to/install/ queue listen