herb miller

WordPress plugin specialist

  • Home
  • About
    • Online CV
    • Contact
    • Find me
  • Shop
    • Seriously Bonkers – softback book
    • Seriously Bonkers – signed book
    • Seriously Bonkers – PDF
  • Dev env
    • Local development
    • WordPress plugins
    • Server environments
    • Development hardware
    • WAMP configuration
    • Tools and languages
    • What’s not in my development environment?
    • Anything else in your development toolkit?
  • Sites
oik-clone v2.0.0 – reconciliation with push, pull and import

oik-clone v2.0.0 – reconciliation with push, pull and import

What has cloning ever done for us?

Asked by: Fuzzy Duck, Ducky Fuzz and the other one

Coming up to five years ago I published my requirements for cloning content between sites. One of the planned enhancements was to support pull cloning. ie. Pulling updated content back from a slave server to the local system, providing the same content cloning functionality as for push cloning, including attachments.

I’m going on holiday to New Zealand fairly soon. I won’t be taking my laptop. I want to be able to import any changes I make on my websites back to my development machine.

Back in June 2019, when I first started writing this post, I developed a batch interface to support push, pull and reconciliation. Then I got sidelined with Do Not Clone logic to cater for posts that get cloned both between subdomains and local and slave servers.

Over the last couple of days, I’ve written a new Slave tab for the oik options > Clone admin page. I think I’ve nearly cracked it. It even seems to work for attachments. I can Import, Pull, Push and Clone content, including re-usable blocks.

Now I’m going to find out if it really does work. Fingers crossed. I’ve packaged a new version of the plugin as v2.0.0-beta-20200127. I don’t think I need to install the plugin on my servers since the changes apply to my local development. But I might as well.

Wish me luck! PS. I will be taking backups before I do anything too drastic.

Requirements

To be able to reconcile changes made to blocks.wp-a2z.org with my local development version of the site ( blocks.wp.a2z ).

This would allow me to create or update content using my iPad or iPhone and pull the changes back to my PC at a later date.

To be able to create/update a whole bunch of content locally, then push it to the slave in a reconciliation process.

This would allow me to install a plugin that delivers blocks and write about each of the blocks then push the completed work to the slave. Doing it this way I’ll have a safety barrier in case anything goes wrong, and visitors won’t need to be presented with Under Construction notices.

To be able to copy content between Multi Sites, so that definitions for blocks registered by plugins such as Jetpack and Yoast SEO are also catalogued in blocks.wp-a2z.org

Proposed solution

  1. Implement a pull solution between local and slave sites.
  2. Implement a batch reconciliation process between local and slave sites.
  3. Implement a pull solution between Multi Site sites.
  4. Implement an Admin User Interface for manually operated reconciliation with a slave server, including cloning new content.

Status – June 2019

In oik-clone v2.0.0-alpha I implemented a batch reconciliation routine that will detect whether or not content on the slave server needs to be pushed or pulled. It can be run in dry-run mode, so that I can see which posts will be pushed or pulled.

Prerequisite to this was the development of the logic to implement a pull process between Multi Site sites and batch routines to implement push and pull of content between master and slave server.

I rolled out an alpha version of the plugin to wp-a2z.org, oik-plugins.com and oik-plugins.co.uk, and herbmiller.me.

Status – January 2019

Because I had a feeling that I’ll need to be able to choose whether or not un-cloned posts are cloned I have implemented a manual Admin user interface.

It’s a manual process in that I have to confirm the recommended action.

There may be a few issues if I accidentally overwrite local content that’s been changed but not pushed with content that’s also been changed on the slave. But I have revisions enabled on my post types so I should just be able to restore… so long as I know what I’ve done.

I’m just about to roll out the latest beta version. I will use it to reconcile content that has already been updated on the servers.

Ongoing development

You can follow my development progress in GitHub.

IssueReference
Add admin facility to reconcile with a slave serverbobbingwide/oik-clone#49
wp_block posts are not immediately clonable using the clone shortcodebobbingwide/oik-clone#48
Map post IDs in block attributesbobbingwide/oik-clone#38
Option for enabling/disabling cloning by post by slave serverbobbingwide/oik-clone#37
Add batch facility to perform reconciliation with a slave serverbobbingwide/oik-clone#34
Add cloning capability for Taxonomy termsbobbingwide/oik-clone#32 – not started
Add batch clone facility for WordPress MultiSitebobbingwide/oik-clone#31
Update MultiSite pull logic for attachmentsbobbingwide/oik-clone#29
Update oik-clone admin MultiSite tab to use on wp-a2z.orgbobbingwide/oik-clone#28

Even though I haven’t developed tests for a lot of the most recent changes, I may close the issues off anway.

Known issues

There are some problems associated with attachments when their parent posts are no longer published. New issue to be raised.

Categories: programming, WordPressTags: clone, pull, push, reconcile

Published: January 27, 2020 | Last updated: January 27, 2020

Products

  • Seriously Bonkers - signed book £8.99 £5.99
  • Seriously Bonkers - PDF £1.00
  • Seriously Bonkers - softback book £8.99 £4.99

Recent Posts

  • Localization of Full Site Editing themes
  • Fizzie – an experimental Full Site Editing theme
  • How to survive WordPress 5.5’s removal of jQuery-migrate
  • SB Children block – my first Single Block plugin
  • Horizontally scrolling tables on narrow devices

Recent Comments

  • Aprende gutenberg #49 - Aprende gutenberg on SB Children block – my first Single Block plugin
  • Richard Cagle on Installing Imagick for PHP 7 on Windows 10
  • WordCamp Birmingham on bucket list – WordCamp Birmingham UK 2015 (#wcbrum)
  • mick on WordPress capabilities: How to restrict Add New while allowing Edit
  • mick on WooCommerce 2.2.4 – Dynamic API Reference

Archives

Categories

WordPress 5.6. PHP: 7.3.26

WordPress version: 5.6

Gutenberg version: 9.7.0

Tide times from tidetimes.co.uk

Tide Times & Heights for Northney on Wednesday, 20 January 2021
High Tide: 04:31 ( 4.10m )
Low Tide: 09:34 ( 1.60m )
High Tide: 16:45 ( 3.90m )
Low Tide: 22:01 ( 1.50m )

Tide times from tidetimes.org.uk

Tide Times & Heights for Northney on 20th January 2021
04:31 - High Tide ( 4.15m )
09:34 - Low Tide ( 1.60m )
16:45 - High Tide ( 3.86m )
22:01 - Low Tide ( 1.55m )

Follow me

  • Home
  • About
  • Blog
  • Contact
  • Find me
  • Privacy notice
  • Sitemap

Site:  herbmiller.me
© Copyright herb miller 2012-2021. All rights reserved.


Website designed and developed by Herb Miller of Bobbing Wide
Proudly powered by WordPress