• Resolved keithvaugh

    (@keithvaugh)


    Hi All
    I am completing an update on a website, however since I began working on the development site, there has been a few sales on the live site. Ideally I’d like to bring these onto the development site before replace the live site with it.
    Also on the development site there has been a few new products added that I don’t want to overwrite.
    Is there a recommended process for doing this?
    Thanks

    https://wordpress.org/plugins/woocommerce/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    Ultimately, I don’t think this will be simple – there will be conflicts with your post IDs.

    IMO you should leave orders as-is on live, and import other content into live from development. Use an importer, e.g. WP ALL IMPORT, so you can control which content comes across.

    Thread Starter keithvaugh

    (@keithvaugh)

    Thanks for responding Mike.
    I am not sure if I will have conflicts. The original site was used as the starting point for the development, i.e. it was essentially cloned on a localhost. I’d think this should ensure all post ID’s etc would be the same. Granted some products where deleted on the development site and new ones added. There has been a handful of orders placed on the live site and I’d imagine the details for these have to reside in the SQL database. Is it not plausible to take the actual table storing these on the live site and merge it with, or even replace the version that would be on the development site?

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    I don’t think I’d recommend it.

    Orders, posts, products – All custom post types.

    Even if you start with the same data, lets say ID 100 is max.

    New order on live = ID 101
    New product on development = ID 101

    See what I mean?

    Thread Starter keithvaugh

    (@keithvaugh)

    Sorry Mike. Complete nob at this. Don’t really get what you mean. I’m not talking about large numbers of order, possibly 20-30 at max.

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    Ok let me put it this way. Orders are linked to order items by ID. Order items are in a separate database table. Moving items across will result in loss of data if these IDs are not kept in sync.

    Therefore I recommend working on the live site’s content, rather than attempting a merge. Especially if you’re not familiar with the WordPress data schema.

    Thread Starter keithvaugh

    (@keithvaugh)

    Ok I think I may be getting it. Each item has a unique ID and each order is associated with these unique ID’s. So in theory if the item ID is the same on both the development site and the live site it might be a matter of just replacing the table containing the orders. Would this be correct (assuming I am brave enough to try it). To be honest there is only one item I am concerned about and all orders are linked to this which might make it a relatively straight forward task.

    I wouldn’t be afraid to give it a try – I have a second clone of the site on my local machine also that I can do some testing on without worry. Is there a particular table I should be on the look for that contains the orders (assuming I get courage to try).
    Thanks for the help.

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    Sort of, but I can tell you for certain; if you’ve added a product, and an order has been added, the IDs will conflict. WordPress auto-increments the ID for each post when created.

    Thread Starter keithvaugh

    (@keithvaugh)

    Thanks for that. I’m beginning to grasp the issue. Would it not matter though that the products I am concerned with are on the original live site, and the new products are only on the dev site along side the original products which came from the backup?

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    If you look at the wp_posts table on both, and look at the latest posts you should see the conflict/overlap for yourself.

    Thread Starter keithvaugh

    (@keithvaugh)

    Will have a scan. Thanks for the help Mike.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Live site and Development Site – Merging data’ is closed to new replies.