Managed WooCommerce

How to Bulk delete pending orders in Managed WooCommerce hosting?

WooCommerce hosting bulk delete pending orders

There may be times when bulk deleting orders becomes necessary, such as orders which have been moved to the trash, or orders with the status of payment pending on a store. Deleting orders from wp-admin can be a slow, tedious process, even if you increase the number of orders that load at one time from the default value of 20 in the screen options.

This is where using the WP-CLI comes in handy, using the wp post delete command (for detailed directions on this command, see wp post delete).

Preparing to Run Commands

First, you will need to login to your portal via SSH. For directions on generating credentials for sFTP/SSH creds from your site manager, see Finding Your SFTP/SSH Credentials in Managed WordPress Portal. For help using SSH, see Logging in to Your Server via Secure Shell (SSH).

  1. Log in, then enter:


This will change the directory to the HTML directory where you can run the WP-CLI commands.

  1. To create a database backup before bulk deleting pending payment orders, run this command;

wp DB export

  1. You can use the gzip compress down the resulting SQL file.

gzip sitebackup.sql