• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

PHP Code To Add New User in WordPress

This solution enables you to add a new user via your functions file.

The code enables you to set the following:

  • The username
  • The password
  • The email address
  • The role

add-new-user

You can use this code to create a new administrator or add any number of users via your functions file, a plugin, theme or MU folder.

If, for some reason you cannot reset your password, you might want to use this solution.

Simply add the following PHP to your functions file and it will create a new user with administrator access:

Register for full access

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.