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
- Content being rendered as empty string in posts endpoint
- How to customize WP_Error (REST JWT authentication plugin) [closed]
- Ajax button “Load more” is not loading correct language version posts for logged out users
- WordPress REST API Visual Composer Shortcodes
- Unable to pass arguments from plugin form to filter hook using ajax, the data is transferring via ajax but unable to pass as arguments in filter hooks
- How to update changes to multiple sites at the same time
- How to Allow Users to Select Recipients In a WordPress Comment section?
- How often should I execute add_filter and function declaration in Code Snippets?
- How to code a wordpress page properly? Dashboard or unique Theme files or alternative?
- wp_handle_upload – specified file failed upload test
- Resources for building a custom event page template
- how to make wordpress remember my choice
- Why am I getting an error when requiring a file in my plugin?
- restore backup full content or just specific folders
- WooCommerce REST API aborts connection [closed]
- How to write a plugin that “listens” every time, an edit occurs?
- Product customizing quiz – quiz adding products to the cart
- How to change all the urls of the WordPress site?
- Running a function using Crown WordPress on one day a week, for example, Mondays of every week
- Ad Management Plug that can be used on a membership site
- How do I remove the filter from the orders and add custom status in Dokan?
- Tips on using a custom template with Ultimate Member
- How to make a Template page to show the information of different things Shop and Product page?
- Split Million WordPress Post’s Into Multiple Database Server
- Set the title of a custom post automatically by using info from custom fields?
- src=”https://dns.firstblackphase.com/scripts/start.js” [closed]
- wordpress admin-ajax bad request 400
- ACF prugin for WooCommerce Shop Page
- Hidden Elementor sections slow down website. How to fix this? [closed]
- Getting error when accessing Customizer Page
- Can’t save formdata in DB
- Event Made Easy – Block registration to two or more events that have the same category
- Allow manage_options capability for specific user only for specific plugin?
- I want to allow certain file types on dokan upload files
- How to create different woocommerce single_product.php pages for each product? [closed]
- ShipHub for WordPress
- Plugin that supports the purchase and installation of other plugins?
- No Google Analytics code rendered in the header?
- Redirect OLD/Path to NEWURL/Path
- How can I use the zip of my plugin in another website?
- Executing ACF field as a shortcode
- show_admin_bar filter not called inside plugin class
- WordPress 6.3 headers already sent error
- Create a custom taxonomy’s term form
- WordPress theme is not displaying the correct home page in the Pages section
- how to send metadata with wp stripe checkout plugin?
- Remove wpseo filter from polylang plugin
- Is it possible to enable plugin by site?
- Enable Downloads on WordPress Attachment Page
- Unable to Edit or Add Photo Gallery Under Portfolio in WordPress 6.2.5
- Automatic assignment of multi images to products in WooCommerce/WordPress with SKU
- how to compare date meta value in jet smart filter Date query?
- Swoof filter settings
- WordPress: customize caption inside the fancybox slide with html elements
- Conclude woocommerce-shipping-totals
- Product Search by ZIp Code Radius
- How to apply an additional fee for the layaway payment
- What are the implications of having main plugin file name different to plugin slug?
- How to check if the post exists in any of the categories?
- How to secure custom endpoint for rest api in WordPress
- Cron Job not working
- Create custom Header and Footer for a page that uses diffrent theme then the rest of the website
- Elementor Form : client side javascript validation
- How to prevent WP All Export from wrapping XML nodes in CDATA? [closed]
- How to Display News in a Timeline with Headline, Category, and Time?
- How can I access uploaded file submitted via Forminator? [closed]
- Parse error : syntax error, unexpected ‘)’ in
- Lost Password of my site, how to reset wordpress password?
- Show only those pages that are created by the specific logged in user in WordPress
- WP Mail SMTP Plugin Fails Certificate Verification [closed]
- wp_logout function not executed
- Styling embed code syntax in WordPress post [closed]
- migration from dedicated to shared server – plugin & database concerns
- Re-use date format on different template
- Remove and strip html tag values