Jump to content

Synchronising Local And Live Versions


NooseLadder
 Share

Recommended Posts

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?  :ph34r:

Kind Regards  O0

Link to comment
Share on other sites

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

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?

  • Like 1
Link to comment
Share on other sites

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.

  • Like 3
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...