Usually, when you delete a plugin, it’s not completely uninstalled. It still leaves behind data in your database (e.g. settings, products, etc.).
That can be a good thing in case you delete the plugin by mistake or only want to temporarily delete it.
But if you are determined to completely uninstall it, then the data from the database should be removed as well.
Fortunately, WooCommerce lets you do that, (usually) without having to manually delete tables from your database.
Completely Uninstall WooCommerce
Completely uninstalling WooCommerce from your WordPress site is fairly easy.
All you have to do is to add a line of code in your
wp-config.php file before deleting the plugin from inside your Dashboard.
Before doing that, I recommend backing up your database, as well as exporting your products – just in case. There’s also a plugin that lets you export even more WooCommerce data.
Access your WordPress files and edit the
Normally, it’s found in the root folder,
Add the below code right above the
/* That's all, stop editing! Happy blogging. */ line.
define( 'WC_REMOVE_ALL_DATA', true);
Now, go to Plugins > Installed Plugins and Deactivate > Delete WooCommerce as you normally would with any plugin.
You can remove the line of code that you added in the
Check the Database for Any WooCommerce Tables
The above process should normally remove everything, including your WooCommerce database tables.
But I recommend checking the database anyway.
In my case, it still left behind a table called
So, if you still have a WooCommerce table left in your database, you should manually delete it.
If you don’t know your way around phpMyAdmin from cPanel, or whatever database tool your hosting provider offers you, you can install a plugin like Advanced Database Cleaner.
Back up your database first!
Go to WP DB Cleaner > Tables, check the WooCommerce table, select Delete from the drop-down, and click Apply.
That’s a Wrap
I hope this tutorial was useful and comprehensive, and you managed to completely uninstall WooCommerce from your WordPress site!
If you have any questions or thoughts, drop a comment or send a message via contact or Facebook page.
You can also hit the follow button on Twitter and subscribe to the YouTube channel.
Don’t forget to share the post to help out others!
Leave A Comment