bea-content-sync-fusion icon indicating copy to clipboard operation
bea-content-sync-fusion copied to clipboard

How does the plugin work?

Open brend2001 opened this issue 5 years ago • 1 comments

Hello, I don't fully understand how the plugin works, how to sync posts automatically. I've set up where to sync from where and what, but I don't know what else I should do to start syncing. I know it requires some programming knowledge, but I don’t understand that, I just want to sync a few wordpress posts. Can you help, describe how the plugin works? I would be very grateful. Thanks

brend2001 avatar Nov 15 '20 08:11 brend2001

Hi, welcome and thanks for your message.

TL;DR this plugin rely on a WP-CLI command to do the syncing between emitter and receivers sites. You can find examples here on how to setup a cron to do that.

After you setup a synchronization for a post_type between an emitter and some receivers, each time you create/update or delete a element of this post_type on the emitter an action is created for each receivers and saved in a custom table in the database. A WP-CLI command must then run to process those actions on each receivers to sync the emitter content with them.

If you have a version of your site running locally you can test the command running :

wp content-sync-fusion queue pull --url=$url

(assuming wp is the wp-cli.phar executable).

Hope this make things clearer for you.

petitphp avatar Nov 17 '20 20:11 petitphp