Pointer to ‘safe’ SQL DELETE STATEMENT

[ad_1]

Hi

Taking over from another dev, who built a custom plugin that integrates with Woocommerce Subscriptions (and of course Woocommerce Orders). I’m looking for a safe SQL DELETE (I’ve used wp cli but it’s very slow) to delete all customer orders and subscriptions from my local environment.

I can easily create a local environment based upon PROD (e.g. repoint to my *.devel URI and repoint all URL in the DB) and want to keep the products (as defined in PROD) but delete all the ‘real’ orders & subscriptions.

I’m used to a ‘set up’ and ‘tear down’ script for WP sites (i.e. import products), and a TEST/STAGING environment but this one has neither. Thanks for any pointers..

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer