Support » Plugin: WooCommerce » After uninstalling WC, how can I remove unnecessary database tables?

  • Resolved cag8f

    (@cag8f)


    Hello. My website was built using a theme that came with WooCommerce. So when I built the site, I initially installed WooCommerce. But my site has no need for a shop, or WooCommerce, so I uninstalled it. But when I uninstalled it, I did not follow these WC instructions to uninstall *and remove all data*. So many WooCommerce tables are still in my database. What is the proper way to remove these? Can I simply install WooCommerce, add define( 'WC_REMOVE_ALL_DATA', true); to wp-config.php, and uninstall WooCommerce? If so, when I install/activate WooCommerce, do I need to carry out any of its ‘setup’ steps? Or can I simply install, activate, add code, deactivate, and uninstall?

    Thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • lorro

    (@lorro)

    I should install WooCommerce. I think the setup wizard has a “skip setup” option, but anyway it only takes a few clicks. Then add the line to debug, then uninstall.

    The unused tables shouldn’t cause a problem if you leave them. By the time you’ve been running the site a year or so, and tried a few plugins for this and that, the database will have loads of unused tables. A good proportion of plugins don’t clear up after themselves.

    Plugin Support Thomas Shellberg

    (@shellbeezy)

    Automattic Happiness Engineer

    Hey @cag8f,

    I would indeed add the line in your wp-config.php file to remove WooCommerce data on plugin deletion and then install and activate WooCommerce; you can skip the setup and then delete the plugin.

    cag8f

    (@cag8f)

    @shellbeezy OK thanks for that. After I delete the plugin and confirm the database tables are gone, I am safe to remove the line of code from wp-config.php–correct?

    Also sorry, I carried out your instructions and they did indeed remove the database tables. But it left over some files. Specifically, installation of WooCommerce installed about 11 images in wp-content/uploads, all are ‘placeholder’ PNG images of different sizes, e.g.

    woocommerce-placeholder.png
    woocommerce-placeholder-150×150.png

    I also have a folder named woocommerce_uploads in wp-content/uploads.

    Why are those still leftover? Can I manually delete them all?

    • This reply was modified 2 months ago by  cag8f.

    @shellbeezy Hello. Any update to this?

    The line of code can be removed from wp-config.php.

    The placeholder images will need to be removed manually.

    The folder will need to be removed manually.

    Sites can quickly get lots of debris from leftover themes and plugins and fortunately it does little if any harm.

    Plugin Support Thomas Shellberg

    (@shellbeezy)

    Automattic Happiness Engineer

    Hi @cag8f – see the great answer from @lorro above – the uninstall procedure does not delete images from the /uploads/ directory. You’ll have to do those yourself.

    @shellbeezy OK gotcha–I removed those files manually. So to be clear though, WooCommerce will automatically download placeholder images to my server. But when I uninstall WooCommerce, it will not automatically remove those images?

    Plugin Support Thomas Shellberg

    (@shellbeezy)

    Automattic Happiness Engineer

    Hey @cag8f,

    But when I uninstall WooCommerce, it will not automatically remove those images?

    That is true.

    @shellbeezy OK then. That’s a bit unfortunate, but thanks for confirming. Is there any way I can submit this as a feature request or something?

    You can post your request here:
    http://ideas.woocommerce.com/forums/133476-woocommerce
    or look for one that’s similar an upvote it.

    OK thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.