R
R
Rasul Gitinov2016-05-02 16:51:53
PHP
Rasul Gitinov, 2016-05-02 16:51:53

How to create super admin via db?

The site has multisite enabled, and the super admin has been removed. Now there is a need to create a new super administrator. I thought in some way through the database to add, but maybe there are other options?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Laid, 2016-05-02
@stoik_kpd

in the database in the wp_users table. Do not forget when you set the password to put - MD5 encryption.

S
Sergey Goryachev, 2016-05-04
@SergeGoryachev

There is also wp_usermeta... The roles are set there.
The keys wp_capabilities and wp_user_level
I would suggest to quickly deploy a separate WP with multisite and look at the values ​​for these keys.
The following is the order.
In wp_users create a new entry, fill in the data. Leave the password blank. Get user_id
In wp_usermeta:
user_id from the previous point, meta_key - wp_capabilities, meta_value - from a separate WP.
user_id , meta_key - wp_user_level, meta_value - from separate WP (I suspect 11).
Set a new password through password recovery and log in.
Should work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question