• Resolved makeonlineshop

    (@makeonlineshop)


    hello,

    I am trying to delete 30000 woocommerce customers but the database seems to be weird, close to crash.

    When using one of the WP plugins, only few hundreds users can be deleted each time I click, then I guess that the server timeout. Then sometimes when I restart I get a database error. Scary to try more.

    When trying to delete with WP CLI
    wp user delete $(wp user list –role=customer –field=ID)
    nothing is deleted and the whole server hangs, even on a dedicated.

    Is it something well known that WP databases can easily break ?
    What is the best solution (safest) to delete 30000 customers ?

    Thank you so much for your help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Howdy!

    Your cli command looks wrong .. see if this works:

    wp user delete ( wp user list -- role = customer -- field = ID )

    Cheers!

    Thread Starter makeonlineshop

    (@makeonlineshop)

    Thank you so much, I have now deleted users from Mysql, but next time I will try your WP CLI Command. Thanks again.

    Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Howdy!

    Excellent! Thanks for letting me know — I’m glad to hear the problem has been resolved!

    Happy holidays!

    Thread Starter makeonlineshop

    (@makeonlineshop)

    Hello,

    If someone is also interested, I can now confirm that this WP CLI command worked on another website:

    
    wp user delete $(wp user list --role=subscriber --field=ID)
    

    I still do not know why it didn’t work to delete the customers on another shop, but now it’s ok, and less scary than doing it in Mysql ??

    Cheers.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Deleting 30000 users without crashing the database ?’ is closed to new replies.