This question is about WordPress cms.
How to create a new admin user with wanted password using a simple script, hosted on same site?
Like, we have site http://example.com/
And the script http://example.com/ourscript.php
If we open the script page, there should be created one more admin user in admin-panel.
It can be done with some mysql-query.
Thanks.
You’ll want to do two queries:
You’ll need to bare a few things in mind:
wp_hash_password()
is the insert_id of the first
statement.
Here is some sample code:
The database object can be found here:
http://www.jtgraphic.net/code/database-object/