• Resolved sparkletack

    (@sparkletack)


    As of yesterday, I can’t login to WP

    WP tells me that my username doesn’t exist, but worse, that user “admin” is not a valid username.

    I’ve tried the “emergency.php” trick, and gone into MySQL to edit the password, but there are no usernames registered in the database, thus no passwords to change.

    The fixes I’ve found online all involve changing a password, not re-adding a username.

    How to resolve this?

    A screenshot of my MySQL setup is here:
    https://www.santacruzharley.com/ad_images/schd_php.png

Viewing 5 replies - 1 through 5 (of 5 total)
  • you need to readd the admin user, than. You can do that within phpmyadmin. Though, its a little tricky with the secret keys, and the salting stuff.

    Ill explain the best way to do this when I come back after getting to work.

    ok. the simplest way to repopulate that data is to install wordpress again, in another directory on your site, using another table prefix

    // You can have multiple installations in one database if you give each a unique prefix
    $table_prefix  = 'wp_';   // Only numbers, letters, and underscores please!

    Make sure that you use the same wordpress version as the other one, and that the keys in the wp-config.php match (i dont know that that would make a diff. were it not, but better safe than sorry).

    After youve done that, you can delete the actual wordpress files from that new install, and go into your database and copy the row for that new installs into the old, empty users table. Then you can delete all those newly created tables.

    Thread Starter sparkletack

    (@sparkletack)

    Thanks Whooami … I’m gonna give it a shot.

    awesome.

    One thing that might simplify this for you, that you can do if youre familiar with using phpmyadmin..

    once you have the tables from the new install — delete the old empty wp_users table (or whatever youre using) and just rename the new table (wpnew_users or whatever you are using) to the old one.

    Thread Starter sparkletack

    (@sparkletack)

    Success!

    Wipin’ the sweat from my brow with relief. ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘login trauma – users have vanished from PHP database’ is closed to new replies.