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:
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:
- Add extension=sodium to php.ini
- Copy php/libsodium.dll to apache/bin/
- 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.
Any doubts about this solution can be mentioned in the Comments section below.
I’d be happy to help.
Also, share the post with the Magento Community via social media.
Thank you.
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.
8 Comments
Hey,
This solution is not working on Magento 2.4.5.
Hello Mage Dev,
As mentioned in the blog, the above solution is for Magento 2.4.2
Thank You
Your solution worked for me. Thanks for the post!
Hello Kapil,
I’m glad that it helped you.
Thank You
Hey
Can you provide path where libsodium.dll exists, i am newbie in ubuntu and magento both
Hello Ajay,
You need to check in your drive
For example: C:\xampp\apache\bin
Thank You
Recently upgraded Magento 2.3.3 to 2.4.2 and similar problem occur.
Wasn’t sure what the problem is so reverted it back to 2.3.3.
My problem was, everything worked but admin wasn’t available. Like the Magento was unable to find path?
Are there any special requirement for Magento 2.4.2 which determine what configuration of the server must be done/changed in compare to the 2.3.3 ?
I’ve spend enough time trying to solve this issue. I have multiple websites on different servers where such problem never happened.
Hello Shmitsu,
Magento 2.4.2 considers pub directory as a main directory.
So, it may cause problem.
Thank You.