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
- Pass PHP variable to javascript
- Plugin not showing in dashboard
- Namespaces in WordPress – How do I initiate the main class?
- Adding Visibility Options
- Problem with Search Results in WP (not displaying the full posts)
- Sub menu with a URL parameter and access the page
- How to restrict an entire WordPress site to visitors, but the register and login page?
- Is revealing just the AUTH_KEY a security issue?
- How to exclude a widget from page 1 of a paginated post
- Diagnosing plugin conflicts
- Is it possible to integrate WordPress *posts* and social media (Facebook, Google+, Twitter)? [closed]
- Licensing: Can I include SWFs without source in a plugin released on wordpress.org?
- Sort products without thumbnail in WooCommerce shop page
- How to create tutorials/book in WordPress [closed]
- Create or Update thousands of woocommerce products via PHP
- WP Paths in a Plugin – how to include
- How to export a list of all media urls? [closed]
- Last modified field for user profile?
- Update Option Error: Notice: Undefined index
- Why this global array is returning NULL from a callback function
- how do i remove posts from a WP_Query so the pagination is right?
- Information and Videos for Customers in the Backend [closed]
- Install Plugin via Code
- How to display custom sidebar in wordpress 5.5.2
- woocommerce_package_rates not fired when wordpress woocommerce accessed as non ajax
- Delete query not working in plugin
- register_taxonomy and variable rewrite slug
- WP All Import – Execute Imports
- background images WP Supersized on homepage
- Caching RSS plugin data
- Limit the amount of words displayed by the Latest News plugin, or recommend an alternative [closed]
- Plugin to hide image in excerpt
- Is there a plugin that lets users request an account on the site? [closed]
- Custom license for WordPress plugin
- Image change on hover
- Localizing methods for jQuery append prepend wrap parent
- How to connect rating to individual comments?
- How to create plugin/ page that reads from database
- Insert ads below the title
- Plugin not properly prepared for localization
- WordPress Active Plugins
- How to add filter for wordpress plugin?
- Woocommerce – Change Variable Product Add to Cart to behave like external product using Custom Field (link) [closed]
- WordPress meta-box and checkbox-list
- Polldaddy doesn’t show up on own theme
- What plugins can I use to feature (affiliate) products on my blog (from Amazon.com)?
- Multiple Post Thumbnails Plugin – Need help with code
- Excluding specific post from custom next/previous theme function
- Problem with WordPress Elementor linked image and Round Corners Going Square Again
- Change language on website and change currency with url query
- How do I stop WordPress from recommending to install the following Plugin
- WordPress – estimate used product
- Revision featured image
- How can I send the mail once?
- Is it okay to make a plugin to the WordPress repo, but limit it’s actions to maximum N events?
- I need to show side menu in wordpress
- Woocommerce product variation price: How to change price dynamically through hooks
- Multisite converted to Single Site can’t add new plugins or new themes
- WordPress Product Detail and catalog
- Translating Website
- Category as Subdomain for One WP Install
- User upload fields
- How to show Conditional Statement In CMB2 for input text?
- How to enable Admins to see Plugins
- How to add wordpress plugins in along with my standalone theme
- Possible jquery / library conflict in plugin usage
- Delivering Page Templates With Plugins
- Display Plugin information on specific url
- Is there a way to add a custom input field for every taxonomy term in WP post editor?
- How to change response of admin-ajax request?
- Plugin keeps saying needs to be updated and it’s in a constant loop [closed]
- wp plugin not working after website live
- How to add plugin to blog [closed]
- how to display the page content in popup window?
- Code snippet plugin not working correctly with Windows live writer and WordPress
- Oxygen plugin wordpress stuck in loading sequence forever when trying to edit a page [closed]
- plugin doesn’t retrieve data from database