So i installed the ultimate facebook plugin and since it

So i installed the ultimate facebook plugin and since it changed all user settings etc it has removed my super admin account which means i can no longer log into my network admin panel via wordpress does anybody know how i can add a super admin via cpanel/phpmyadmin

thanks

  • Ash

    Hello @adam

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    Ultimate Facebook plugin doesn't remove your admin login info, there might happened something else.

    But yes, you can add an admin user via phpmyadmin. Create a new wordpress multi site locally. Create an admin user and from wp_users table in phpmyadmin copy the password.

    Now login to your live site phpmyadmin, navigate to wp_users table, edit your admin user, paste the password you get from local site and save.

    Then you should be able to login via live site username and local site password in your live site.

    In here wp_ is the table prefix, it might be different in your setup. So look for SOMETHING_users.

    Hope it helps! Please feel free to ask more question if you have.

    Cheers
    Ash

  • adam

    im working with this code to add new user in SQL

    INSERT INTO wp_users (user_login, user_pass, user_nicename, user_email, user_status)
    VALUES ('newadmin', MD5('pass123'), 'firstname lastname', 'email@example.com', '0');

    INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value)
    VALUES (NULL, (Select max(id) FROM wp_users), 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');

    INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value)
    VALUES (NULL, (Select max(id) FROM wp_users), 'wp_user_level', '10');

    does anybody know what string i must change administrator to? or other functions in order for new network admin to be created?

    thanks

  • adam

    How to create a new multisite network super admin

    Step1) To begin, log into your cPanel.

    Step2) From the main cPanel screen, find the Databases category and click on the icon entitled phpMyAdmin.

    Step3) Once the first screen appears, look to the left hand sidebar and click on the database for your specific WordPress installation.

    Step4) After the database information loads, you will need to find the tab named SQL and click on it

    Step5) This leads you to an SQL editor where you will enter some code that will create a new admin account for you. Below is the code to create a new admin account named newadmin with the password pass123. You may change any of the content in red to fit your needs, but leave all other data as is.

    INSERT INTO wp_users (user_login, user_pass, user_nicename, user_email, user_status)
    VALUES ('newadmin', MD5('pass123'), 'firstname lastname', 'email@example.com', '0');

    INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value)
    VALUES (NULL, (Select max(id) FROM wp_users), 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');

    INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value)
    VALUES (NULL, (Select max(id) FROM wp_users), 'wp_user_level', '10');

    Step6) After replacing any data fields you need, click the Go button to perform the insertion.

    Step7) This should simply refresh the screen and you should see the messsage '1 row affected' after each of the three SQL statements. This means the insertion ran smoothly. From here, visit your wordpress admin login area as normal and use the new admin login information. You should get to the admin interface without issue.

    This is how to create a standard website administrator now lets make the account a network super admin.

    Step1) Locate your wordpress site msql database

    Step2) Locate the field in the database table wp=_sitemeta

    Step3) Locate the Site_Admin Field click edit

    Step4) You will find a line like this a:1:{i:0;s:12:"Example Name";}
    the example name will be the name of the admin account you setup in the first section 12 represents number of characters in username: and name is admin user to make super admin

    this is the method i used i hope ive done it accurate enough and i hope it helps others im always willing to assist if anyone needs it

    thanks

  • Ash

    Thank you for your details explanation. You need not do such things if you can just replace the password from a new installation as I described above :slight_smile:

    Also, this is weird that UFB affect the admin account, as many users are using this and we didn't get any report like this. Personally I use same plugin for my multisite and always try to login via facebook as this is much easier.

    Thanks again for your report. Surely, we will keep testing on this and will try to replicate.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.