• Resolved Jim

    (@kernix)


    I added the line of code to wp-config.php that this forum provided for me a couple of months ago: https://woocommerce.com/document/installing-uninstalling-woocommerce/#uninstalling-woocommerce

    
    define( 'WC_REMOVE_ALL_DATA', true );
    

    What exactly does that remove? I still see the pages in my admin area. The link above mentions:

    If you deactivate and delete the plugin from WordPress, you only remove the plugin and its files. Your settings, orders, products, pages, etc… will still exist in the database

    How come the pages are still there?

    • This topic was modified 2 years, 10 months ago by Jim.
Viewing 14 replies - 1 through 14 (of 14 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi @kernix,

    What exactly does that remove?

    The constant added above the /* That’s all, stop editing! Happy publishing. */ comment in the wp-config.php file will reset and delete WooCommerce related tables from your database which means it will delete all the products, orders history, WooCommerce related pages and pretty much everything else.

    How come the pages are still there?

    Which pages are left to delete? Can you make a screenshot via https://snipboard.io?

    Thanks.

    Thread Starter Jim

    (@kernix)

    Here is a link to a screenshot that I uploaded to my media library: https://fairmountpetservice.com/Blog/wp-content/uploads/2022/01/woo-pages.png

    Not sure if it matters but I am on SiteGround.

    • This reply was modified 2 years, 10 months ago by Jim.
    Mirko P.

    (@rainfallnixfig)

    Hi @kernix,

    Thanks for sharing a screenshot of your Pages section.

    It appears that it all worked correctly as the default pages have been deleted and moved to the trash. To permanently remove them from the database you can click on the Empty Trash button or delete them individually with the “Delete Permanently” button.

    Thanks.

    Thread Starter Jim

    (@kernix)

    No – I manually deleted them. Plus, pages and posts in the trash can be restored if done within 30 days I believe. Which means the data is still in the db.

    • This reply was modified 2 years, 10 months ago by Jim.
    Mirko P.

    (@rainfallnixfig)

    @kernix

    Well, this is supposed to work according to the WooCommerce.com documentation. You can see the data it removes in this file: https://github.com/woocommerce/woocommerce/blob/master/uninstall.php.

    If it’s not working on your install for some reason, you may want to reach out to your host that will be able to assist with the deletion of any WC data left in the database.

    Thread Starter Jim

    (@kernix)

    It’s definitely not working because I have multiple page views in my options table with values in the option_name column prefixed with woocommerce or widget_woocommerce. But I removed the plugin months ago. What’s with this line from the docs:

    Then when you deactivate and delete WooCommerce it will remove all of its data from your WordPress site database.

    Are you telling me that you have the plugin installed, add the line to wp-config THEN remove the plugin?

    Thread Starter Jim

    (@kernix)

    ANSWER: Yes, the plugin actually has to be installed for the code snippet to work. Oh, boy – what a lot of work that you need to do to remove a plugin!

    Mirko P.

    (@rainfallnixfig)

    Most likely something happened months ago when you tried to completely remove WooCommerce.

    The constant WC_REMOVE_ALL_DATA works when there is actually a plugin to be deleted and it has to be entered in the wp-config.php file before disabling and deleting the plugin. I’ve also checked on Github and there are no reports of the constant being faulty.

    If you still have WooCommerce tables left in the database, the best advice would be to reach out to your host that can help clear them and optimize your database.

    Thanks.

    Thread Starter Jim

    (@kernix)

    I reinstalled the plugin after commenting out the code snippet in the config file. Then I un-commented the snippet, deactivated the plugin, removed it, and then everything was gone.

    Mirko P.

    (@rainfallnixfig)

    Glad to hear it – thanks for letting us know!
    ?
    If you have any further questions, I recommend creating a new thread.

    “I reinstalled the plugin after commenting out the code snippet in the config file. Then I un-commented the snippet, deactivated the plugin, removed it, and then everything was gone.”

    So much hope. But no, I’m still getting a fatal error uninstalling WooCommerce with the WC_REMOVE_ALL_DATA. “WooCommerce Google Analytics Integration” or other WooCommerce plugins seems related to this. May the uninstall of some of thoses plugin may cause a larger issue?!

    You definitly have a code issue here. There are many place on the web people complain about this. Could you please, send this serious error to the dev team ? This error came from 2020 and earlier…

    Thread Starter Jim

    (@kernix)

    @funkytoc

    Do the following:

    1. reinstall the plugin – You have to have the plugin installed before you add the code to wp-config.php
    2. Go to your root folder public_html
    3. open wp-config.php
    4. find the line /* That’s all, stop editing! Happy publishing. */
    5. directly above that add define( ‘WC_REMOVE_ALL_DATA’, true ); and save the file
    6. then deactivate and remove the plugin.

    That will work. If it doesn’t then the problem is on your end. It may be your host company not letting you save changes to the config file. Double-check that the code is still there after you save wp-config.php and close it.

    I tried this many times. And in many other ways, plugins/theme OFF, reinstalling the other secondary plugins too, try different uninstall process. Nothing works.
    The code is here, I did install wordpress myself, there is no access limitation on it.

    I finaly uninstall it manualy (I’m a web dev), but that’s a shame and a waste of time. The uninstall process have to be improved if not working properly in a simple case like mine (and so many other people).

    Thanks for your time.

    Plugin Support Sérgio L. a11n

    (@csnlima)

    Hi @funkytoc,

    Thanks for letting us know you did it manually, and thanks for the feedback.

    If you want to follow up, so we can investigate it further, please open a new topic as this one is already closed:

    https://www.ads-software.com/support/plugin/woocommerce/#new-topic-0

    Best,

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Uninstalling Woocommerce’ is closed to new replies.