How to add a new admin user to WordPress using functions.php
Add the following code to your themes functions.php file. Visit your website. Log in to WordPress Dashboard. Remove the code from functions.php See Function Reference wp create user - WordPress…