WP CLI commands for MailChimp User Sync

When using our MailChimp User Sync add-on plugin on a website that has a lot of users, it is recommended to run the initial synchronisation process from your server’s command line. This will be many times faster than invoking it through the web interface.

Available CLI commands

The following CLI commands for User Sync are available. Before running any of these commands, ensure you have configured the plugin settings correctly.

wp mailchimp-sync all –role=<role>

Synchronises all users with the given role. If no role is specified, the plugin will use the role specified in your plugin settings.

Example: wp mailchimp-sync all --role=customer

wp mailchimp-sync process-queue

Processes all pending jobs to synchronise local user changes with MailChimp.

It is advisable to setup a server cronjob that runs this command every few minutes.

Was this article helpful? ·