WooCommerce is one of the popular ecommerce plugins for WordPress sites. The popularity comes due to the fact that Automattic, the company behind WordPress, is the same developer for WooCommerce. In addition, many popular themes offer WooCommerce as a bundled plugin with integrated theme functions. If you are using WooCommerce store and decided to migrate to another option like Shopify or delete the plugin, here is the complete process to clean up your WordPress site.
Why to Delete WooCommerce?
Though popular, WooCommerce has many problems in terms of usability.
- It slows down the site with too many scripts and styles. Learn more on how to fix slow WooCommerce store with admin Ajax problem.
- The plugin adds many custom fields in wp_postmeta table. If you see the table grows bigger, then WooCommerce is the culprit to blame (assuming you are not using any other plugins that add meta data).
- Surprisingly it is not easy to migrate the store to another site or subdomain or subdirectory.
- It adds 20+ tables in the database, occupying much of DB storage.
- The latest WooCommerce version includes the “Analytics” section. This will add more pressure on the server in addition to already heavy plugin.
- It creates lot of transient and log files which you need to cleanup regularly.
We are using WooCommerce from 2015 and the bigger problem in one of our cases was the migration. We had 3K+ blog posts with 50+ WooCommerce products on that site. With this situation, WooCommerce slowed the site almost 1 second and occupied 50% of database size. In addition, we had to allow user registration only to accommodate WooCommerce customer registration. This was inappropriate for us to keep the plugin on the main site that affected 95% of other content. Therefore, we decided to move the store section to subdirectory and completely delete it on the main site.
Remember that the migration process is so complex that can easily make you frustrated. Learn more about how to migrate WooCommerce store from one WordPress site to another based on our experience.
Completely Delete WooCommerce Plugin
With all the above facts, WooCommerce will add tons of backend stuff to your WordPress installation. You have to get rid all those stuffs to completely remove the plugin.
- Cleanup WooCommerce data before deleting the plugin
- Delete customer details from “Users” section of admin panel
- Deactivate and delete the plugin from admin panel
- Remove custom fields from wp_postmeta table
- Delete database tables using phpMyAdmin
- Check and delete files from backend
Let us explain each step in detail.
Quick Way
Before we explain the detailed way, there is a quick solution to get rid of WooCommerce data completely. Edit your wp-config.php file through FTP or File Manager and add the following line:
define('WC_REMOVE_ALL_DATA', true);
Make sure to use straight quotation marks and add the code just above the /* That’s all, stop editing! Happy blogging. */ line in the file. After that, deactivate and delete the plugin from your admin panel. Later, you can again go back and remove the above code from wp-config file. This will completely delete all WooCommerce data from your WordPress installation.
If you want to manually check the data and delete the plugin, then follow the below instructions.
1. Cleanup WooCommerce Data
When you decided to delete the plugin, first delete all relevant data from the admin panel.
- Delete all product pages and categories by navigating to “Products > All Products / Categories” sections.
- Remove all coupons and orders under “WooCommerce > Orders” and “Marketing > Coupons” sections.
- Delete log data from “WooCommerce > Status > Logs”.
- Cleanup transient data under “WooCommerce > Status > Tools” section.

2. Delete Customer Details
When a user purchases a product through WooCommerce store, WordPress will create a user account with “Customer” as a role. You have to delete all customer users on the site before deleting the plugin.
- Go to “Users > All Users” section in admin panel.
- Click on the “Customer” (on top row) to filter all customer user roles.
- Click “Bulk Actions” dropdown and select “Delete” option.
- Select “Apply” button to delete all the selected customer users.
If the customer data spread across multiple pages, you have to delete them multiple times. Click on “Screen Options” to setup number of items per page to 100 or more, so that you can delete them quickly.
3. Delete WooCommerce Plugin
This is pretty simple step. Login to your WordPress admin panel and navigate to “Plugins > Installed Plugins” section. Find and deactivate WooCommerce plugin. After deactivation, you can simply delete the plugin from your site.
Deleting the plugin will only remove the plugin files from your site. However, there are many integrations created by the plugin need manual effort.
4. Remove Custom Fields
WooCommerce uses hundreds of custom fields for different actions. WordPress will store all these custom fields as meta keys in wp_postmeta table that you need to delete manually. Ensure to delete ONLY WooCommerce custom fields to avoid affecting other functions on your site. Unfortunately, we could not find any custom field list for WooCommerce. Here are the meta keys we found in postmeta table we found on our database.
| free_shipping | _order_shipping_tax | _crosssell_ids |
| _shipping_country | _shipping_postcode | _completed_date |
| _shipping_first_name | _order_total | _backorders |
| _shipping_last_name | _date_completed | _order_shipping_tax |
| _shipping_company | usage_limit_per_user | usage_limit |
| _shipping_address_1 | usage_count | product_ids |
| _shipping_address_2 | product_categories | Payer last name |
| _shipping_city | minimum_amount | maximum_amount |
| _shipping_state | limit_usage_to_x_items | _product_attributes |
| _order_shipping | _refund_amount | _purchase_note |
| _sku | _product_image_gallery | _sold_individually |
| _upsell_ids | individual_use | customer_email |
| _customer_ip_address | _customer_user_agent | _customer_user |
| _tax_status | _tax_class | _order_tax |
| _prices_include_tax | _cart_discount_tax | _wc_rating_count |
| _wc_average_rating | _billing_country | _billing_first_name |
| _billing_last_name | _billing_company | _billing_address_1 |
| _billing_address_2 | _billing_city | _billing_state |
| _billing_postcode | _billing_email | _billing_phone |
| _billing_country | _order_version | _order_currency |
| _order_key | _sale_price_dates_from | _sale_price_dates_to |
| _min_variation_price | _max_variation_price | _min_price_variation_id |
| _max_price_variation_id | _min_variation_regular_price | _max_variation_regular_price |
| _min_regular_price_variation_id | _max_regular_price_variation_id | _min_variation_sale_price |
| _min_sale_price_variation_id | _max_sale_price_variation_id | _max_variation_sale_price |
| _regular_price | _sale_price | _sale_price_dates_from |
| _sale_price_dates_to | _price | coupon_amount |
| _created_via | _recorded_coupon_usage_counts | _downloadable |
| _download_limit | _download_expiry | _downloadable_files |
| _cart_discount | _cart_discount_tax | _paid_date |
| _payment_method | _payment_method_title | Payment type |
| _stock_status | _manage_stock | total_sales |
| _recorded_sales | is_vat_exempt | Payer PayPal address |
| PayPal Transaction Fee | _paypal_status | _transaction_id |
Follow the below instructions to delete them from your database.
- Login to your hosting account, search and open phpMyAdmin app.
- It will open the database of your site with all table details.
- Go to “xx_postmeta” table where xx is the table prefix you used during WordPress installation process.
- We recommend you to take the backup beforehand and browse the table for finding the available custom fields on your site.
- You can use SQL query to first find the number of occurrences of any field before deleting.
For example, use the below query in the textbox under “SQL” tab to find the meta keys that contains “ship”.
SELECT * FROM wp_postmeta WHERE `meta_key` LIKE '%ship%'

Once you confirm the selection, edit the query like below to delete them from your database.
DELETE FROM wp_postmeta WHERE `meta_key` LIKE '%ship%'
You can directly use the delete query, if you know the correct meta key value (custom field value). Learn more on how to delete unused custom fields in WordPress database.
5. Delete Database Tables
Unfortunately, deleting the plugin will not delete database tables in the backend. When you are in phpMyAdmin section, select all WooCommerce tables and delete them manually. Below are some of the table we found in the database. In general, all WooCommerce related tables will have either _wc_ or _woocommerce_ in the name. Since WooCommerce has plenty of add-ons, you may also have additional tables with different naming convention on your database.
| wp_wc_admin_notes | wp_wc_order_tax_lookup |
| wp_wc_admin_note_actions | wp_wc_product_meta_lookup |
| wp_wc_category_lookup | wp_wc_tax_rate_classes |
| wp_wc_customer_lookup | wp_wc_webhooks |
| wp_wc_download_log | wp_woocommerce_api_keys |
| wp_wc_order_product_lookup | wp_woocommerce_attribute_taxonomies |
| wp_wc_order_stats | wp_woocommerce_downloadable_product_permissions |
| wp_wc_order_coupon_lookup | wp_woocommerce_log |

Select table and go to “Operations” tab in phpMyAdmin. Click on “Delete the table (DROP)” option and confirm the prompt to delete the table and content.

6. Delete Files
The last step is to delete all residual files left over by WooCommerce plugin.
- Login to your hosting server using FTP account.
- Check the “Uploads” folder under “/wp-content/”.
- You may find WooCommerce placeholder images, “woocommerce_uploads” folder containing downloadable files, logs and GeoIP database.
- Delete all those WooCommerce files from your server.
Final Words
Many users simply delete WooCommerce plugin from admin panel and assumes that is enough. Unfortunately, it is not and you have to manually remove all the traces. Leaving the residual database tables and file content will continue to impact the size and loading speed of your site. Good thing is that you have a quick option to add an entry in wp_config.php file to completely get rid of all data when deleting the WooCommerce plugin.




