NooseLadder Posted July 29, 2014 Share Posted July 29, 2014 Hi, I have a client who wants to update his website content locally. This will take him some weeks. Meanwhile his live site will continue to change due to his customers making bookings online etc. I can't really see a way round this unless one of you genii has any ideas? Kind Regards Link to comment Share on other sites More sharing options...
arjen Posted July 29, 2014 Share Posted July 29, 2014 Hi Nooiseladder, have you searched the forums? There are plenty of topics discussing your question. 1 Link to comment Share on other sites More sharing options...
pwired Posted July 29, 2014 Share Posted July 29, 2014 Yup this has been discussed a lot in the forum, just look for it. Not easy to accomplish because as you said online database changes all the time. If you find anything interesting, please post back as this is something wanted by many of us. Link to comment Share on other sites More sharing options...
DaveP Posted July 29, 2014 Share Posted July 29, 2014 I might be completely barking up the wrong tree here, but some synchronisation shouldn't be too hard using the tools that PW already provides. Thinking out loud here, so please chime in and tell me I'm bonkers or whatever. Some data will only change on the remote server - orders, comments etc. Some will only change on the remote server - editorial changes, new pages etc. And some will change of both - can't think of an example. We can probably specify which group each changed item falls into by PW template - template=order, template=comment for the 1st above, template=basic-page for the 2nd. For each of these we just need to know what has changed since we last synced, which is doable. (I'm thinking some smart cookie can write a module for this, but it might be possible through other means.) We can easily get PW to output JSON, XML, CSV or whatever, which can be read in and the changes made to whichever (local or remote) needs to be updated. The only problem is where both sides have changed, there would need to be a diff file created or something. Your thoughts, people? 1 Link to comment Share on other sites More sharing options...
NooseLadder Posted July 29, 2014 Author Share Posted July 29, 2014 Well there is this module by Adrian: Migrator You can export part or all of a sites page tree by selecting the parent and it has options to export everything, including all data pages, fields templates and structural pages or fields and templates only. You can also select a changes since date and time and you can select any additional files over the template files such as includes, css etc On the import side there are 3 options: APPEND will not change settings of existing fields, nor the content of existing pages. It will append new fields to templates and new pages (and date) to the selected Parent Page.OVERWRITE will change field settings and edit the content of existing pages so they match the imported data.REPLACE will match the destination to the source exactly, by modifying page data, changing field settings, and deleting unused fields from templates. You can import user data and created/modified dates as options. I have tried this with part of a page tree for a single page and it works ok. I haven't had time to test the changes since option, but maybe this module is close to what we need? When I have more time I will carry out some tests. 3 Link to comment Share on other sites More sharing options...
Nico Knoll Posted July 29, 2014 Share Posted July 29, 2014 Yeah, probably it's exact what you need. But I'm not sure how specific you can choose which pages should be exported... Link to comment Share on other sites More sharing options...
pwired Posted July 29, 2014 Share Posted July 29, 2014 : https://processwire.com/talk/topic/1284-best-practice-for-staging-to-live-database-synchronization/ http://www.sitepoint.com/one-click-app-deployment-server-side-git-hooks/ https://github.com/netcarver/new-git-deployment https://processwire.com/talk/topic/5417-using-git-with-a-cms-for-version-control-and-deployment-on-multiple-machines/#entry53567 (I also use heidi-sql portable with great success) 1 Link to comment Share on other sites More sharing options...
adrian Posted August 5, 2014 Share Posted August 5, 2014 Yeah, probably it's exact what you need. But I'm not sure how specific you can choose which pages should be exported... Migrator allows you to specify down to a single page to export and import if you want. So as long as the pages that your client is creating/editing are not also being changed on the live version, it should work just fine. You can also select a changes since date and time This option was designed for exactly this purpose - it will export only those pages that have changed since the selectedd date/time. CAUTION: The migrator module has the potential to overwrite large amounts of content on the destination site so I recommend testing thoroughly with a test destination site first so you are comfortable with the changes that will be made based on the settings you have chosen. And when you do use on your live site, make full DB backup just before you import the content. Most importntly, let me know how it works out for you Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now