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:
wp_insert_user( $userdata );
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.