I want to know what changes should be made (or which meta_key and meta_value should be inserted) inside WordPress database in order to change the WordPress user role.
I already found out how to change it to administrator by inserting
`meta_key`:`wp_capabilities`,
`meta_value`: `a:1:{s:13:"administrator";s:1:"1";}`
and
`meta_key`:`wp_user_level`,
`meta_value`:`10`
But what I want to know is how to insert a user with different user role, or how to change an existing user role.
I already know WordPress has specific functions for it, but I want to do it via a custom php code.