Open bobbingwide opened 5 years ago
In order to make the pull logic work we need to record the target clone id back in the source otherwise mapping of relationships won't work. This needs to be done for both MultiSite pull and batch pull.
It would be helpful if the batch routines check a couple of things.
url=
parameter, if passed, is valid in the context. switch_to_blog()
and restore_current_blog()
in single site. dry-run
parameter; do not push when dry-run=y
Even though oik-clone v2.0.0 has been released I'm not going to close this until the solution's been documented.
Documentation should refer to batch processes: reconcile.bat
and reconciled.bat
, and the new routines run under oik-batch.
And these routines need updating to reflect changes in the target test environments.
The oik-clone Admin MultiSite tab ( #28 ) solution is fine when there's only a small amount of content to clone. But what about when I want to clone a whole raft of items? For example all the documentation for the core and core-embed blocks created in core.wp.a2z that need to be cloned to blocks.wp.a2z and the other blocks in the other subdomains.
Requirement
WordPress MultiSite batch clone pull facility
To pull content from one site to another. A batch interface for the:
WordPress batch push facility
To push content from one site to another. A batch interface to the [clone] shortcode.
Once the content has been generated/updated locally then we need to be able to identify and push changes, as required. For a manual front end method see https://www.oik-plugins.com/shortcode_example/most-recent-work/
Proposed solution
Notes
The solution needs to be more advanced than just using WP-CLI
a method mentioned here https://wordpress.stackexchange.com/questions/253234/how-do-i-clone-or-duplicate-a-post-with-the-wordpress-command-line-interface-wp