Can Snapshot be used to update a specific plugin? (WooCommerce orders/customers)

Hi!

I have built a lot of WP sites from scratch, and I know that process well now. But I need help with redesigning an existing site. It’s going to take a couple of weeks at least, but they don’t want their site to have too much downtime (a few hours is ok).

Usually I develop my sites locally on my laptop, and then move them (using Snapshot) when they're ready to be live. I was originally planning on just duplicating their existing site using Snapshot and working on it locally, and then replacing the old (current) site with the new one when it's ready. But it’s an eCommerce site with occasional sales. If I copy the site over and work on it separately, there will most-likely be new orders coming in during the time period that I’m redesigning -- and I’m not sure if there’s a way to import JUST those potential orders later, in order to keep things up-to-date before debuting the new site (they are using WooCommerce -- yeah, I know...I wish it was MarketPress).

Is there a way to go about this using Snapshot, where I could copy the site elsewhere, work on my redesign for however long it takes, and then update JUST the most recent WooCommerce components later somehow, while keeping all my new redesign intact? (And would any new customers also import?).

I'm still a little unclear about how Snapshot works, and what it actually does -- so any help/advice in this regard would be greatly appreciated.
Thanks!!

  • Rupok

    Hi Anton

    I hope you had a wonderful day.

    I’m not sure if there’s a way to import JUST those potential orders later

    Well, the scenario is complicated here. Please note, as WooCommerce is not a plugin from us, so don't take my words for granted. I'm just suggesting you based on my search result.

    I got this link (https://docs.woothemes.com/document/installed-database-tables/) where they described on which database tables, they store their values. So take a backup of these tables before you restore your local site to the client server. This could save the orders made.

    I found this in another thread "yes, "orders" are just a custom post type, so all the orders are stored in wp_posts. there is definitely order info in wp_postmeta and "order_status" is a taxonomy, so you'd need all the various "terms" tables." Another person is saying "order data can be found in wp_postmeta under the meta_key, _order_items".

    So, I think, after you complete your work on your local machine, you have to make a staging site for the live site, do some trial and error on that staging server with these database tables, and when you think you've got the optimum thing for your scenario, do that in live server.

    I'm still a little unclear about how Snapshot works, and what it actually does

    Snapshot does exactly what the name suggests. It takes a snapshot of any given state, and then you can replicate that snapshot to another place. But the beauty inside it is that, you can decide exactly what to consider during taking snapshot and what not to. With other backup plugins, they just compress all files in the root directory, and takes a SQL Dump of the whole database. But in Snapshot Pro, you can select File backup option (which file to take, which not to), Database Table archive option (which table to take, which not to) and lots of other features.

    Please let us know if you have any confusion. We will be glad to help.

    Have a nice day. Cheers!
    Rupok

  • Anton

    @Rupok -

    Thanks for your reply!

    I already duplicated the current (live) site on my server a few days ago, and I wanted to wait until the current site had a new WooCommerce order, to see if I could then take a Snapshot of just the WooCommerce tables only (the seven listed in your link) and import them into the in-development version of the site.

    Unfortunately it didn't seem to work. I'm not sure if I'm doing this correctly, so please let me know if I'm doing anything wrong. Here are my steps:

    1) On the current (live) site, I start creating a new Snapshot. In "What Files to Archive" I select "Do not include files" -- as I'm assuming that means the themes, plugins, etc...all of which have already been imported. (When I duplicated the entire site, I did select all files -- but I assume when you're just doing a snapshot of part of the database, this is not needed). In "What tables to archive" I only select the seven relevant WooCommerce tables. I don't do anything else, and click "Create Snapshot."
    2) I go to my list of Snapshots there, and download the archive file it has just created.
    3) I go to the duplicate I've made of the site (currently a live staging site), and ftp the Snapshot file to wp-content/uploads/snapshots, and import the file there.
    4) I go to list of Snapshots on new site, see the snapshot just imported, and click "restore." There's a bunch of optional settings on next screen but I leave them alone, and just click restore again.
    5) It goes through the process, the progress bars all complete, and it says it's done. (This is the same process I used to duplicate the ENTIRE site).

    However, when I check my WooCommerce orders, the new recent order is not there.

    When I look at my Snapshots again, and click on restore again (just the first time), it shows me the snapshot file again, with the status "Archives: Pending"

    What does that mean? Did I do something wrong? Is there another step I need to do? Is the restore going to happen at some point later by itself? Not sure what "pending" means.

    Any help would be greatly appreciated!
    Thanks

  • Anton

    OK - I'm still having difficulty with this, unfortunately...

    Once again, my ideal scenario would be to take my time fully designing a NEW website, and then when finished somehow import JUST the latest WooCommerce orders (and customer user data) from the current live site -- so I would have the latest data from the old site just before launching the new one.

    Here's the problem I'm facing when I'm doing tests:
    I design some quick "test" pages on the new site. When I do a Snaphot of the current site's WooCommerce orders, one of two problems occurs...
    1). If I take a snapshot of JUST the WooCommerce tables only, and import/restore into the new site, nothing happens. Nothing imports.
    2). But if I take a snapshot of the Woo tables, plus the other stuff you mention (wp_posts, wp_postmeta, wp_term_taxonomy, and I assume wp_users and wp_usermeta is needed as well), and then import and restore that to the NEW site, then ALL the test design pages I've done get completely wiped out.

    So how can I preserve the design changes I've done, while also importing the Woo orders from the old site (without overwriting any new design)?

  • Ash

    Hello @Anton

    I hope you are doing good.

    When you use snapshot, this is mainly for complete restore operation, so it depends on some other data in your site. I am not exactly sure why it's not restoring the woo tables only, but note that order has a relation with product, product is a custom post type so it stores information into meta table, so basically it will need wp_posts and wp_postmeta tables too. I think the tables are imported, but for lack of data from posts and postmeta table, those orders are not showing.

    In that case, I would recommend to use any woocommerce order export/import plugin.

    Here are some extensions from woo: https://www.woothemes.com/product-category/woocommerce-extensions/import-export-extensions/

    Also, you can try WP All Import and WP All Export plugin. They have woo extension too.

    Those plugins/extensions are developed based on woocommerce, so you can perfectly export/import any woo related data.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash