WP CLI and Cron with WP Synchro
WP Synchro supports WP CLI, which is the most widely used CLI (command line interface) to WordPress. This allows you to execute commands to a WordPress site, such as creating users, posts and much much more.
WP Synchro automatically adds a command to this tool, which allows you to run synchronization directly from commandline, via SSH, via a Windows command prompt or planned via a cron system.
This is mostly used to plan the execution of synchronization, so that it will run, lets say, every hour or whatever is needed. Alternatively it can be executed in another script, such as one being run as part of a CI (Continuous Integration) environment.
To get started, you need a working installation of WP CLI, which you can get from WP CLI website.
Then you execute this command in the site web root:
Which will give you the commands supported by WP Synchro.
Currently we only support running synchronizations that are already configured on the frontend.
So to execute a synchronization, you first create it and then navigate to it on the Overview page and hover mouse over it, and press the "Schedule" link.
This will bring up the popup, with the command you need to run. This could be something like:
wp wpsynchro run 5cebf0756c518
Which will run this specific synchronization from the command line and can be added to your hosting cron system.
Still using free version? - Try PRO with 14 day free trial
PRO version makes it possible for you to synchronize files between your sites and to
automatically make a database backup before migration.
You will get support for Basic Authentication and email notifications on success or failure. You also get access to priority support