Title: Activate user in PHP
Last modified: May 5, 2022

---

# Activate user in PHP

 *  [robb1e](https://wordpress.org/support/users/robb1e/)
 * (@robb1e)
 * [4 years ago](https://wordpress.org/support/topic/activate-user-in-php/)
 * Hi everyone,
 * I am an admin for a clubs website I maintain. For some strange reason I have 
   lost most of my admin privileges somehow.
    I have access to the database and 
   made a new admin account, however, I can’t login as my ‘new’ account has not 
   been activated (admin needs to approve registrations). How can I manually activate
   the new account on the database?
 * Many thanks for your help in advance.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [4 years ago](https://wordpress.org/support/topic/activate-user-in-php/#post-15618875)
 * see [https://www.wpbeginner.com/wp-tutorials/how-to-add-an-admin-user-to-the-wordpress-database-via-mysql/](https://www.wpbeginner.com/wp-tutorials/how-to-add-an-admin-user-to-the-wordpress-database-via-mysql/)
 *  Thread Starter [robb1e](https://wordpress.org/support/users/robb1e/)
 * (@robb1e)
 * [4 years ago](https://wordpress.org/support/topic/activate-user-in-php/#post-15618908)
 * Thanks but that doesn’t show or tell me how to ‘activate’the user. I have inserted
   a new user but need them activated.
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [4 years ago](https://wordpress.org/support/topic/activate-user-in-php/#post-15619051)
 * Core wordpress has no concept of “activation” for a user added like that. What
   plugin are you using for that?
 *  Thread Starter [robb1e](https://wordpress.org/support/users/robb1e/)
 * (@robb1e)
 * [4 years ago](https://wordpress.org/support/topic/activate-user-in-php/#post-15619064)
 * I added the user just like the link you suggested. However the website is set
   to only allow ‘activation’ manually (by selecting activate user on their profile).
   
   Therefore, I can’t get the new admin account to login as it has not been ‘activated’
   by an admin, which is me, and I’m locked out.
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [4 years ago](https://wordpress.org/support/topic/activate-user-in-php/#post-15619092)
 * AGain, what plugin are you using for that?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Activate user in PHP’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/activate-user-in-php/#post-15619092)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
