Delete All Product Images in phpmyadmin
You can loop through all the woo-commerce products and delete them along with their attachment(images).. $args = array( ‘post_type’ => ‘product’, … ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php wp_delete_post( $loop->post->ID ); wp_delete_attachment( $loop->post->attachment_id ); ?> <?php endwhile; ?>