Wordpress setting the user_pass in DB is not permanent: has to be renewed each login


Results 1 to 1 of 1

Thread: Wordpress setting the user_pass in DB is not permanent: has to be renewed each login

  1. #1
    Join Date
    Nov 2024
    Posts
    224

    Red face Wordpress setting the user_pass in DB is not permanent: has to be renewed each login

    hello and good day dear friends


    good evening - first of all : i hope that you are all right and everything goes well at your site!


    today i have no Linux issue - but a DB-one: the issue: ? setting the user_pass in DB is not permanent ? it has to be renewed each login ?

    two weeks ago i lost the access to my wordpress-site:

    well i thought i can fix it ? due to some works in the backend ? the db ? in the user- table:

    i found the user_pass column and change the password there. well i knew i will need to enter a new, secure password hash.
    ( Alternatively, i might were able to edit the user_email column to update the email address associated with the account )

    Save changes: Click ?Save? or ?Continue? to apply the changes to the database - i had to get the hash for the new password

    see here: https://codebeautify.org/wordpress-p...hash-generator

    Then i run this query to update the users password

    Code:
     UPDATE users SET user_pass = ?NEW_HASH_HERE? WHERE users.user_login = ?YOUR_USERNAME?;
    well - see here a littel update:

    belive it or not: i encounterred that if i set the login to the new password ? with the hash ? then i am only able to log in

    once with the new data /and credentials -imagine: if i try to do this a secod timme then it fails ?

    even if i try it from another notebook ? it fails ?

    what can i do here!`?

    hmm to make it working again ? i have to do hmm ? ?nasty things? :

    i have to enter the term on the db again ? then it will work for a one-time login!?

    Code:
     UPDATE wp_users SET user_pass = ?my hash? WHERE user_login = ?my user name?
    but belive me ? thats really annouying ? thats awful

    what can i do ? what is the solution!?



    What do you say to this here:

    Code:
    SET user_pass = MD5(?my password?) instead. WP
    will accept it and then hash it on successful login.


    i reall look forwared to hear from you


    update: just want to share this with you - if some body runs into the same issues:


    ✅ Summary & solution to my problem (Login only possible once in WordPress 6.8.2)


    I had the problem that I couldn't log in a second time after logging in. This only occurred after updating to WordPress 6.8.2.
    After some tests and downgrades, it turned out:
    My other instances are running fine on 6.7.1 and 6.4.3, and login/logout works as usual.
    So the error only affects the latest version 6.8.2 in combination with my environment.

    🔎 Diagnosis:

    My server environment was outdated:
    PHP ​​7.4.28 (EOL, without security updates)
    MySQL 5.5.x (EOL since 2018)


    WordPress 6.8.2 uses stricter password hashing, which causes problems with this older environment.
    Result: Password hashes were truncated or incorrectly saved → login is only possible once.

    🛠️ Solution for my 6.7.1 test instance:
    Manually set the password to MD5 in the database (e.g., UPDATE wp_users SET user_pass = MD5('NewPassword') WHERE ID = ....
    This allowed me to log in multiple times immediately. WordPress automatically converts the hash to the current format upon the first login.
    Confirmation: Login/logout now works flawlessly again under WordPress 6.7.1.


    📌 Conclusion:
    The problem is due to the outdated server environment, not WordPress itself.
    I was able to isolate and confirm the error by downgrading.
    The next step is to update my server to a more up-to-date environment:

    PHP 8.2
    MariaDB 10.6 LTS or MySQL 8.x
    After that, WordPress 6.8.2 should also run without login issues.

    Perhaps this will help someone who sees similar problems: If logging in only works once → check your PHP/MySQL version and, if necessary, the length/integrity of the user_pass fields in the database.


    greetings to you all...
    Last edited by dhubs; 09-13-2025 at 02:01 PM.
    ....Love Linux - and all things GNU - : and the idea exchange with the community .

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •