• Okay, I recently set up a bridge between my SMF forum and my wordpress and everything was fine. UNTIL…

    I was deleting a test member in my forum and accidentally deleted the admin account for my wordpress! Is there any way to get my admin privileges back without having to reinstall? Can I edit any php file in the wp-admin folder on ftp or something?

    I really put a lot of effort into it and I really don’t want to have to start over.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Can I edit any php file in the wp-admin folder on ftp or something?

    uh no. users and their permissions are stored in the MySQL database.

    remake the user inside phpmyadmin, or just pull the sql bits out of your last backup.

    You do backup, right?

    Thread Starter zomg-kevin

    (@zomg-kevin)

    okay i’m in phpmyadmin and i have no clue what I’m doing.

    In case someone else finds this and needs the help, but can’t find any… here’s how I fixed mine (piecing it together from memory):

    • in WP, create another user/administrator the way your original one was.
    • back up your database. I use the wp-dbmanager plugin for this.
    • get into phpmyadmin, and look at your wpusers table (it’ll probably be the last one of the ten or so on the list on the left)
    • you’ll see the new user that you just created, but the ID (the first line of table values) will be 2, or 3, or whatever it is – depends on how many other users you have. If you have a ton, then it’ll be the last one, since you just created it.
    • edit it… (sorry, can’t remember the exact sequence here, but once you’re looking at the user you want, click the pencil icon)
    • all you want to do is change the ID back to 1. Save, and get out.

    Assuming all is good, log back in to your wp admin area as the new user/admin, and delete the other. When you delete the extra one, you’ll have the opportunity to transfer all the posts to a different user, so put all those onto your new admin account.

    That should do it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Admin Deleted!’ is closed to new replies.