• Hi all, what’s the best way of doing a LOCAL SERVER -> LIVE SERVER synch, where the LOCAL site has the newest page/post content?

    My site uses WP in ‘CMS mode’ — it’s not a blog and it mainly uses static pages. But I have enabled user comments on pages and also News items.

    The site is complex and I do all development locally. This development involves the creation of new pages and posts and new theme templates. I NEVER update the live site from it’s live admin: local content is always newest.

    I need to keep the local database in synch with the live database. As I have comments enabled on the live site, I can’t copy the entire local database over the the live one as I will lose those comments.

    So it seems it’s simply a case of copying the WP_POSTS and WP_POSTMETA from my LOCAL database over the LIVE database?

    I’m guessing this should work fine as looking at the structures of the data, comments are only tied to posts by their common ID and as these won’t ever change, there shouldn’t be any problem with broken relationships between comments/pages/posts or overwritten data — should there?

    Any perspective on this would be much appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter gambit37

    (@gambit37)

    Nobody have any ideas about this? I guess I’ll just have to try it and see what happens… ??

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    It depends on whether the live site has changed anything in those tables since the local refresh. It’s hard to say whether or not you can do it without comparing the two sides.

    Also, if you only copy posts and postmeta, you’ll lose category/tag information. You’ll also need to compare and copy terms, taxonomy, and term_relationships.

    On the whole: Don’t do this. Don’t make changes on one and then expect to be able to send them to another. WordPress was not designed for this and eventually, you’ll break something. WordPress has preview and unpublished posts/pages functionality for a reason. If you want to develop new pages and page templates and such, you can do it on the live site and only you’ll be able to see it until you publish it.

    Thread Starter gambit37

    (@gambit37)

    OK, thanks for the answer, I thought it would be something like that. So there’s no way of transferring a local database to a live server but leaving comments on the live site intact? That’s a shame.

    I’m doing some pretty complex stuff with continual tweaking and experimenting. Sometimes things break. That’s fine on a local install, but not so great on a live one… ??

    I did consider using some different CMSs but I’ve gone so far on my WP dev now that I simply can’t start from scratch again.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Updating pages & posts from a local install to a live install’ is closed to new replies.