I know the former allows additional parameters, so you can more user info, but other then that, why do both exist?
The specific reason I want to know is that wp_insert_user() is happening REALLY slowly. Somewhere between 5 – 10 seconds. I don’t remember having this problem in the past, when I was using create_user, so I’m wondering if there’s a lot more happening behind the scenes with one as opposed to the other.
Thanks.
None. The whole source of
wp_create_user()
is:It just calls insert version almost immediately, basically a shorthand wrapper. As for why it exists – core works in mysterious ways and (short of hunting down developer by version control history and asking) there is rarely way to tell. 🙂
As per Codex
So the main difference would be that with
wp_insert_user
you may pass more than just($username, $password, $email)
. A full list of all the additional parameters for wp_insert_user can be found on its Codex page