Mass update WooCommerce product status

After importing your products you might find they’re all set to ‘Private’ so you may want to set them to Published.

NB. Always backup your files and database first!

Simply log onto phpMyAdmin and select your Word Press database.

Click on SQL in the top menu and paste the following code in.

UPDATE wp_posts
SET post_status=’publish’
WHERE post_type=’product’

Click ‘Go’ to run the script.

It took about a second or two to complete on a database with over 1700 products for me.

Much quuicker than 20 at a time with the standard WP bulk edit tool!!

you can also set the post_type to ‘draft’ if you wish…


UPDATE wp_posts
SET post_status=’draft’
WHERE post_type=’product’

Leave a Reply