Make WordPress Core

#60379 closed defect (bug) (invalid)

Deleted users still show in count?

Reported by: inder93's profile inder93 Owned by:
Milestone: Priority: normal
Severity: critical Version: 6.4.2
Component: Database Keywords: needs-refresh needs-testing
Focuses: ui, administration, multisite, coding-standards Cc:

Description

I had around 6000 users on my multisite network. I deleted 4500 users directly from database with these SQL queries.

DELETE from wp_users where ID IN (1,2,3,....);
DELETE from wp_usermeta where user_id IN (1,2,3,....);

I checked from database, users are deleted successfully but in WordPress dashboard it still showing 6000 counts. When I search deleted user, it's not showing I think there is an issue with user count please let me know how to fix this.

Change History (2)

#1 @spacedmonkey
10 months ago

Hello @inder93.

It is not recommended to delete database tables directly. You should call wp_delete_site directly. There are a number of caches that are cleared when calling this function. To fix your issue, I would flush object caches or maybe call clean_blog_cache.

#2 @johnbillion
10 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.