Content of the page

How to add WordPress user using php code

Content of the article

Sometimes its necessary to create a new user on WordPress site using PHP code (for example not possible access to email and password doesn works, etc ...). Below is code which will do this work:

Drop the code in index.php of the site, or in functions.php file of the current wp theme, refresh any page of the site and then remove this script from the place you dropped it. Now its possible to login into the site using credentials: demo/demo.

 

Leave a Reply

Be the First to Comment!

Notify of

wpDiscuz