How do I delete a wordpress user from giant database?

Using WP CLI, you can easily delete users without concerns about loading the WordPress UI. wp user delete is the command you’re looking for. In your case, use wp user delete 123 –reassign=567 for deleting a user by ID and reassigning to another user.

Auto approve new users if their username is included in a predefined list

You might put this code in functions.php : $GLOBALS[‘allowed_users’]= [‘mikejordan’, ‘jamesbrown’, …]; add_action(‘user_register’,’my_function’); function my_function($user_id){ // get user data $user_info = get_userdata($user_id); if ( in_array($user_info->login, $GLOBALS[‘allowed_users’] ) ) { $res = $wpdb->query($wpdb->prepare(“SELECT activation_key from {$wpdb->signups} WHERE user_login = %s)”, $user_info->login)); if (!empty($res)) { wpmu_activate_signup( $res->activation_key ); } } }