Solved: Magento 2.4.2 Admin Login Not Working on Localhost

Magento 2.4.2 released on February 09, 2021.

Experts recommend upgrading to the latest Magento 2 version asap in order to not only leverage the latest enhancements in performance but also improve the security of the store!

However, if you might have tried to install the Magento 2.4.2 in localhost and explored the admin panel, you may face an issue like this:

unlock error message

If your admin login is not working properly after installing Magento 2.4.2 on localhost, I can relate!

I faced the same issue and implemented the below solution to resolve it.

If your Magento 2.4.2 admin login is not working on localhost, it is because the libsodium extension of apache is not enabled.

Steps to Solve Magento 2.4.2 Admin Login Not Working on Localhost:

1. Add extension=sodium to php.ini

2. Copy php/libsodium.dll to apache/bin/

3. Restart Server

That’s it.

Many of the merchants also reported a common issue that caused the ‘Widget.getProductId is Not a Function‘ error on the product page after upgrading to Magento 2.4.2.

Also, share the post with the Magento Community via social media.

Thank you.

Jignesh Parmar

Article by

Jignesh Parmar

An expert in his field, Jignesh is the team leader at Meetanshi and a certified Magento developer. His passion for Magento has inspired others in the team too. Apart from work, he is a cricket lover.