Job2 Street

Saturday, December 21, 2019

How to Remove Products in Bulk from Woocommerce

Step 1: Login to phpmyadmin from your Cpanel Hosting

Login to your cPanel hosting or Plesk hosting, Scroll down to database section and click on phpmyadmin.

Step 2: Select the Database

Click on the Respective database and click on SQL tab at top as shown in the below picture.

Step 3: COPY AND PASTE the below code

DELETE relations.*, taxes.*, terms.*
FROM wp_term_relationships AS relations
INNER JOIN wp_term_taxonomy AS taxes
ON relations.term_taxonomy_id=taxes.term_taxonomy_id
INNER JOIN wp_terms AS terms
ON taxes.term_id=terms.term_id
WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type='product');

DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type = 'product');
DELETE FROM wp_posts WHERE post_type = 'product';

Step 4: Click on Go Button and wait a few minutes.

Once the query is executed properly, All the products are removed. Go and check in WordPress Admin. All the products are removed.

No comments:

Post a Comment

K-Play

kPlaylist - get your music online

The player will show in this paragraph

2 3

IkimFM

speaker music speaker