-
Notifications
You must be signed in to change notification settings - Fork 71
Advanced Queue Setup In CLI mode
The following instructions guide you on how to set up an advanced queue in CLI mode for your Mailchimp integration with WooCommerce.
From version v2.3 onwards, we've switched the queue processing system to Action Scheduler, making some of our previous functions redundant. 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
```
Remember, these instructions are specifically for legacy versions of the plugin prior to v2.3.