Skip WooCommerce Orders and Products
Whenever you use WP Staging Pro to push changes from the staging site to the live site you need to make sure that WooCommerce Orders, WordPress users, and WooCommerce products on the live site are not affected in any way.
You also need to make sure that if you make changes to the staging site and then push the changes, any orders, transactions, and users that were added in the interim will remain untouched.
So what is the best way to prevent those data from being overwritten during the pushing process?
First of all, we need to understand where WooCommerce and WordPress are storing transactional orders, products data, user data like customer address and all other data like posts and pages:
- Orders and products are stored in table
wp_postmetaseparated by the custom post type ‘orders’
- WordPress itself also stores all its data like pages and posts in the same tables.
- Users are stored in
There are also a bunch of other WooCommerce custom tables which store things like tax rates, order items, and general WooCommerce settings.
Each table name will be prefixed with a certain table prefix e.g.
The WooCommerce table names will be prefixed with the same table prefix but they also begin with
The number in the prefix is the number of your staging site. So if you have multiple staging sites that number will be counted up like
wpstg2_ and so on.
A) Exclude relevant tables before you using the WP Staging push process.
B) Export orders and transactional data from the live site and import them into the staging site before migrating the staging site to live.
Note: Option B is the much better and saver one!
To skip WooCommerce orders you need to exclude the tables below.
All tables beginning with:
The huge drawback is that this also excludes posts and articles and any other data that is stored in the tables _posts and _postmeta on our WordPress site. For instance, WordPress stores menu entries and all other custom post type data in these tables as well.
So the better option is to export first your orders and products data with a separate export/import plugin from the production site and then to import them into the staging site before you do the push.
There are several plugins to do that job.
One of them is the one by WebToffee
(If you know another reliable import/export plugin please let us know)
Keep in mind that exporting and importing orders will likely change the order id of most of the new orders due to the reason that the WooCommerce order id is the same as the post id which is a unique number in WordPress. So if the post id on your staging site is already used the imported order gets a new id which results in a new order id.
So if you like to keep the order id you need to install a separate plugin which install’s a new database entry that stores the order id in a separate field that allows you to have that order id separated.
Before you push the staging site make sure to set your website into maintenance mode or to disable the shopping system to make sure that no orders come in while you push data from the staging site to live.
Read also this ongoing in-depth and technical article about migrating WooCommerce orders from one site to another:
Before you export and import any orders from your live site to live it’s strongly recommended to create another staging site to test this whole process before you do the import and export on the real staging website!
See also: WooCommerce database table reference
Keywords: WP Staging + WooCommerce, WP Staging Exclude WooCommerce Orders, Exclude WooCommerce Products