Create User Admin Account

Create User Admin Account on WordPress via FTP/PHP

Here is a little snippet which can create a WordPress backend account with ease using the FTP, just paste this PHP snippet in the active theme’s functions.php and the account will be created. Also, make sure the username and the email are unique, or the function will fail.

If you forgot your Website’s Control or WordPress Username/Password. If you’ve only FTP access to access the files then you can create WordPress Admin Account very easily. After that you can access on your Dashboard via your new User Admin account.

Few days ago I was working on a Client’s WordPress Site. He was forgot his Control Panel’s Password. At that time it’s impossible to contact with Hosting Support because it will take some times. The customization’s were very emergency, relates with Payment Integration. He’s provided FTP access. I accessed to his Files and opened functions.php file and place the little snippets at the bottom of the file.

The function above will creates an Administrator account. It will be an Administrator account with full features of websites. You can create other user accounts like Author, Editor, Contributor or Subscribers.

Above function used WP_User() Class. Learn more about WP_User.

Learn more about user Roles and Capabilities.

If you want to Create custom Roles and Controls the Roles and Capabilities then read this article.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.