As a developer you got a Magento 2 project, integrate theme, complete all customization, tested all sales functionality. Your project is now ready for production.
When you enter into backend catalog product grid, you will see all your test products. You can delete one-by-one or multiple at a time, right?
When you enter into backend sales order grid, unfortunately you won’t find any option to delete order! You know those should be deleted. But how?
You can either set their status as “Cancelled” or “Hold” but you can’t delete those test orders from your store.
Here is the post that help you to clear Magento 2 test data such as:

  • Clearing all products
  • Clearing all categories
  • Clearing all customers
  • Clearing all wishlists
  • Clearing all reviews
  • Clearing all search results
  • Clearing all orders and related data
  • Reset all increment Ids

In order to delete those test data, you have to log in to your PhpmyAdmin using root access and run few queries to get rid of those test orders.
NOTE: PLEASE take a backup before performing any database operations.

1. Clearing all products:


2. Clearing all categories


3. Clearing all customers


4. Clearing all review


5. Clearing all wishlists


6. Clearing all search result


7. Clearing all order and related data


8. Reset increment ID


This sql scripts are based on Magento Ver.2.1.1 database. Again PLEASE TAKE BACKUP before run above sql scripts.

You can find Magento 2 pre-launch check list here

Thank you for reading this post!!!