You couldn’t have a more perfect solution, since this is precisely what WordPress core itself has to handle.
See, in early years WP used just one pass MD5 for passwords. Then they went to better hashing, but obviously it should have kept working with old hashes.
Now if you take a look at wp_check_password()
, what it is doing (at the moment user attempts to log in) is following:
- Checks if hash looks “old”
- If so verifies it in “old” mode
- If so updates hash to “new” one (using password, which is available at this moment in runtime)
- Otherwise verifies in “new” mode
You should simply follow precise same logic! Hook into check_password
or override wp_check_password()
altogether (it’s so called pluggable function). Then implement same check & upgrade logic for your hashes.
Related Posts:
- How can I log a user out of WordPress before the page loads?
- How to authenticate custom API endpoint in WooCommerce [closed]
- How to assign user a role if none is present when logging in
- Security error WP 4.0 + WP phpBB Bridge [closed]
- Use WordPress with a custom OAuth2 provider
- wp_authenticate but not logged in
- How to save generated JWT token to cookies on login?
- how to oauth1 Wp plug-in revoke/reset.?
- Why can’t I access my Intranet LDAPS with NADI?
- Can’t view ‘More details’ on plugins pop up is blank and Authy pop up
- What am is missing? (API CORS)
- Possibility to login without password
- Cannot access empty property error in Advanced Access Manager
- How to store a secret for a plugin inside public_html
- create pages automatically and dynamically in wordPress
- prevent anonymous access to WordPress site (non-admin site)
- How can I upload and password protect Javadocs in WordPress?
- Why does WordPress use cookies for /wp-admin and /wp-content/plugins for non-admin users [duplicate]
- WordPress ReAuth =1 Loop with wpCAS
- Advice on setting up private site
- Change All Login/Signup Links in Plugin
- Social login authentication via wordpress rest api
- WordPress User Registration/ Sign Up -> Able to take Paid Certification Courses & keep track of Completed Certificates
- I am trying to add form using ACF plugin and acf_form() function, but my user fields dont show up properly
- WP Crowdfunding login redirect fails
- WP Rest-API response is unauthorized (React)
- Content being rendered as empty string in posts endpoint
- How to customize WP_Error (REST JWT authentication plugin) [closed]
- Problem with add_action
- To perform the requested action, WordPress needs to access your web > server
- Custom API plugin to execute 3rd party API to retrieve data
- Is there a way to convert shortcodes to html content?
- Proper way to handle admin-ajax calls
- How to display the featured post on the category page?
- Disable globally “Crop thumbnail to exact dimensions (normally thumbnails are proportional)” with Multisite
- How to find the list of custom post type where logged in user is author
- UTF-32be error WordPress
- Loop in elementor custom widget not working
- Change text string in a plugin
- Set Multiple Meta Values as an Array Using dispatch( ‘core/editor’ ).editPost() Call in Gutenberg/JS
- wp-admin send 404 error
- How to create plugin/ page that reads from database
- Stop wordpress from requesting external jquery from googleapi
- Can the benefits of performance optimization plugins outweigh the tax of installing them on performance?
- get_users(); Is an Undefined Function When Used in Cron Job
- Alternate email sending service – eg: AWS SES [closed]
- 5 PHP Fatal error: Uncaught ArgumentCountError (Cannot Find)
- Disabling a plugin lead to styles being shown as plain text
- the_content() printing DOCTYPE, and tags in the middle of page
- How to deal with Slow HTTP POST (slowloris) vulnerability
- How to create author profile showcase in wordpress
- What is the purpose of WP_CONTENT_URL?
- Blog previews on custom page with more buttons
- Order posts by meta key ( Using ACF )
- Control page content visibility based on URL parameter
- Where does MonsterInsights put Google Analytics code?
- WooCommerce Shopping Cart Not Initially Showing Products [closed]
- Elementor Custom Control: How to get input value?
- Elementor page builder plugin not loading up all the way? [closed]
- How to add fields in the WordPress editor?
- How can I fetch data from another website to my wordpress website with mysql database
- Sucuri SiteCheck failing on domain with iThemes Security Pro plugin
- How to translate WP Blog (search, category etc.)?
- WordPress SVN UTF-8 issue
- How can I concatenate variables to search results title? [closed]
- Migrating WordPress – New domain entry, links broken
- Search Results Page filter by page title
- Activate and deactivate plugin automatically
- WooCommerce: after install hook
- Test my WordPress Plugin standard or not
- Theme My Login Shortcode Doesn’t Return Anything
- How retreive saved data from gravity forms in my template?
- is_rtl returns false while it should return true
- issue in wp_localize_script
- Import MS-Access data file to make the searchable page
- License validate function
- Sanitize $_GET variable when comparing
- Include Minit plugin in theme [closed]
- Plugin for an interactive image? [closed]
- Where can I save plugin data?
- echo get_option in header template
- How to display all functions (hooks, filters, or custom php) used on a page inline
- wp_enqueue_style on template_redirect level?
- Plugin not working & permalink erorr after upgrade to php 7x on Nginx
- Clear out old images, any advice?
- problem with sql query
- Access post title from custom meta box on title change
- How to add a new column with text fields to WooCommerce Cart List?
- How to use filter to disable adding a product to wishlist?
- Running multiple security plugins
- Save user total active time after login in wordpress [closed]
- add_query_arg not work in admin
- Add a “View all” button on WooCommerce product archives pages
- Opening a JQuery modal window on click of a button with a JQuery plugin
- I am trying to make a field show and save from quickedit screen
- Merge tags in multistep Gravity Form?
- Add to array, redirect and display
- How to track analytics with a WordPress site under the same domain as my main site?
- Can I clone plugin folder to another directory so that I don’t have to reinstall them?
- correctness of URL