Mass update WooCommerce product status using phpMyAdmin

0
(0)

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’

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

About Author


David Cropley

David has been programming computers for over 30 years. It's more of an obsession than a hobby! As well as having his own moderately successful retail business, David works as a Web Developer for a company called Radikls, a web design company in the South of the UK.

Leave a Reply