Background
The code was developed to assist with the update of the primary website for a firm of Independent Financial Advisers who wanted to update their website with a new theme and content.- In the UK, Independent Financial Advisers are authorised and regulated by the Financial Conduct Authority
- Most content changes need to be approved by a compliance team
- The process of creating new content and/or updating existing content was expected to take a reasonably long time
- The new version of the site was developed as a private site within a WordPress Multisite network
- Meanwhile the live site was going to be updated with other new content. See below
- In order to review the changes for the new site the compliance team needed access
- After approval we needed to integrate the content changes as quickly as possible
- oik-clone v0.1 was used to compare and update existing content and to import new content into the live site from the development site
Requirements
- Integrate new/changed content from the development site into the live site without affecting other newly created content
Solution
Implement the pull model for WordPress Multisite, with the following features.- Match content to existing content
- Detect changes and compare content with current
- Pull changes from a selected source site into the current target site
- Pull content and post meta data
- Import new content or update existing
Process
The overall process followed was:- Clone the live site to the development site
- Develop changes in the development site: theme, plugins, menus, widgets and content
- Business as usual on the live site; new blog posts, changes of personnel, updates to some attachments, newsletters published, new testimonials, etc.
- Make required changes in the development site: theme, plugins (new), menus, widgets and content
- When necessary, having first confirmed that changes will not affect the live site, apply updates to certain plugins which are also used in the live site
- Obtain approval from compliance
- Take a complete backup
- Clone the latest version of the live site to another sub site
- Pull changes back into the live site using oik-clone’s compare and update functionality
- Take another complete backup