Remove WooCommerce from WordPress: Plugin or All Data
In this article
This guide shows you two ways to remove WooCommerce from your WordPress site: deleting only the plugin files (keeping your products, orders, and settings in the database) or completely wiping all WooCommerce data (products, orders, customers, and settings) from your database. You'll need admin access to your WordPress dashboard and, for a full data removal, access to your database via phpMyAdmin or a similar tool. Always back up your site before starting.
What You'll Need
- WordPress admin credentials (username and password).
- FTP or file manager access to your hosting account (for manual plugin deletion if needed).
- Access to phpMyAdmin or another database management tool (for full data removal).
- A full backup of your site (files and database) – essential.
Step-by-Step
Option 1: Remove Only the WooCommerce Plugin (Keep Data)
- Back up your site. Use a backup plugin or your hosting control panel to create a full backup of your files and database. Store it off-site.
- Deactivate WooCommerce. In your WordPress admin, go to Plugins → Installed Plugins. Find WooCommerce and click Deactivate.
- Delete the plugin. After deactivation, click Delete below the plugin name. Confirm the deletion when prompted.
- Verify removal. Go to Plugins → Installed Plugins and ensure WooCommerce is no longer listed.
- Clean up leftover files (optional). If you want to remove any residual files, use FTP or your hosting file manager to delete the
wp-content/plugins/woocommercefolder. This is usually not necessary after a standard delete.
Option 2: Remove WooCommerce and All Its Data
This permanently deletes products, orders, customers, and settings. There is no undo.
- Back up your site. This is non-negotiable. Create a full backup and download it to your computer.
- Deactivate and delete the plugin. Follow steps 2–4 from Option 1.
- Access your database. Log into your hosting control panel (cPanel, Plesk, etc.) and open phpMyAdmin. Select your WordPress database.
- Run the cleanup SQL. Click the SQL tab and paste the following SQL statements. Replace
wp_with your actual WordPress table prefix (check yourwp-config.phpfile if unsure). Run each statement separately or all at once.DROP TABLE IF EXISTS wp_woocommerce_api_keys; DROP TABLE IF EXISTS wp_woocommerce_attribute_taxonomies; DROP TABLE IF EXISTS wp_woocommerce_downloadable_product_permissions; DROP TABLE IF EXISTS wp_woocommerce_log; DROP TABLE IF EXISTS wp_woocommerce_order_itemmeta; DROP TABLE IF EXISTS wp_woocommerce_order_items; DROP TABLE IF EXISTS wp_woocommerce_payment_tokenmeta; DROP TABLE IF EXISTS wp_woocommerce_payment_tokens; DROP TABLE IF EXISTS wp_woocommerce_sessions; DROP TABLE IF EXISTS wp_woocommerce_shipping_zone_locations; DROP TABLE IF EXISTS wp_woocommerce_shipping_zone_methods; DROP TABLE IF EXISTS wp_woocommerce_shipping_zones; DROP TABLE IF EXISTS wp_woocommerce_tax_rate_locations; DROP TABLE IF EXISTS wp_woocommerce_tax_rates; DROP TABLE IF EXISTS wp_woocommerce_order_notes;
- Remove WooCommerce options. Run the following SQL to delete WooCommerce settings from the
wp_optionstable:DELETE FROM wp_options WHERE option_name LIKE 'woocommerce%'; DELETE FROM wp_options WHERE option_name LIKE '_transient_woocommerce%'; DELETE FROM wp_options WHERE option_name LIKE '_transient_timeout_woocommerce%';
- Remove WooCommerce user meta. Delete any user-specific WooCommerce data:
DELETE FROM wp_usermeta WHERE meta_key LIKE 'woocommerce%'; DELETE FROM wp_usermeta WHERE meta_key LIKE '_woocommerce%';
- Remove WooCommerce posts and post meta. This deletes products, orders, and coupons. Run:
DELETE FROM wp_posts WHERE post_type IN ('product', 'product_variation', 'shop_order', 'shop_order_refund', 'shop_coupon', 'shop_webhook'); DELETE FROM wp_postmeta WHERE post_id NOT IN (SELECT ID FROM wp_posts); - Remove WooCommerce taxonomies. Delete product categories, tags, and other custom taxonomies:
DELETE FROM wp_term_taxonomy WHERE taxonomy IN ('product_type', 'product_visibility', 'product_cat', 'product_tag', 'product_shipping_class'); DELETE FROM wp_terms WHERE term_id NOT IN (SELECT term_id FROM wp_term_taxonomy); DELETE FROM wp_termmeta WHERE term_id NOT IN (SELECT term_id FROM wp_terms); - Remove WooCommerce scheduled actions (optional). If you used WooCommerce's Action Scheduler, run:
DROP TABLE IF EXISTS wp_actionscheduler_actions; DROP TABLE IF EXISTS wp_actionscheduler_claims; DROP TABLE IF EXISTS wp_actionscheduler_groups; DROP TABLE IF EXISTS wp_actionscheduler_logs;
- Verify cleanup. In phpMyAdmin, check that the WooCommerce tables are gone. You can also search for 'woocommerce' in the
wp_optionstable to ensure no leftover options.
Common Mistakes
- Not backing up. The most common and costly mistake. Always back up before touching anything.
- Using the wrong table prefix. If your prefix isn't
wp_, the SQL will fail or delete nothing. Checkwp-config.php. - Deleting the plugin before removing data. If you delete the plugin first, some data may remain orphaned and harder to remove cleanly.
- Forgetting to clear cache. After removal, your site may still show WooCommerce pages due to caching. Clear all caches (browser, plugin, server).
- Running partial SQL. Skipping the options or user meta cleanup leaves behind hidden data that can cause errors.
Tips
- Use a staging site. Test the removal on a staging copy of your site first to see what happens.
- Export important data. If you want to keep order history or product data, export them as CSV before deletion (WooCommerce has built-in exporters).
- Consider a plugin. For full removal, plugins like “WooCommerce Removal” or “WP Reset” can automate the process, but manual SQL gives you more control.
- Check for dependent plugins. Some plugins (like payment gateways) may break if WooCommerce is removed. Deactivate them first.
- Update permalinks. After removal, go to Settings → Permalinks and click “Save Changes” to flush rewrite rules.
Troubleshooting
- Site shows errors after deletion. If you removed the plugin but left data, some themes or plugins may still reference WooCommerce functions. Reinstall WooCommerce temporarily, then do a proper full removal.
- SQL errors “table doesn't exist”. This means you already removed some tables or used the wrong prefix. Double-check the prefix and run the statements again.
- Products still appear. Clear your browser cache and any caching plugin. If they persist, check the
wp_poststable for leftover product posts. - Database size not reduced. Some data may be in the
wp_postmetatable. Run the postmeta cleanup statement again after deleting posts. - Cannot access admin after deletion. This is rare, but if it happens, restore your backup immediately.
Frequently Asked Questions
Will deleting the WooCommerce plugin delete my products?
No. Deleting the plugin only removes the code. Your products, orders, and settings remain in the database. They will become visible again if you reinstall WooCommerce.
Do I need to delete WooCommerce data before removing the plugin?
No, but if you want a clean removal, it's better to delete the data first (or use the SQL method) so you don't leave orphaned data behind.
Can I reinstall WooCommerce after full removal?
Yes. After a full data wipe, you can install a fresh copy of WooCommerce. It will start with no products or orders.
Will removing WooCommerce affect my other plugins?
Possibly. Plugins that depend on WooCommerce functions may break. Deactivate them before removal and check their documentation.
Is it safe to run the SQL queries manually?
Yes, if you have a backup and use the correct table prefix. However, mistakes can corrupt your database, so proceed carefully.
What if I only want to remove WooCommerce data but keep the plugin?
You can use the SQL cleanup statements (options, posts, etc.) without deleting the plugin files. This resets WooCommerce to a fresh state.