{"id":1680,"date":"2021-03-23T10:30:14","date_gmt":"2021-03-23T10:30:14","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/solved-magento-2-4-2-admin-login-not-working-on-localhost\/"},"modified":"2025-09-01T11:42:12","modified_gmt":"2025-09-01T06:12:12","slug":"solved-magento-2-4-2-admin-login-not-working-on-localhost","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/solved-magento-2-4-2-admin-login-not-working-on-localhost\/","title":{"rendered":"Solved: Magento 2.4.2 Admin Login Not Working on Localhost"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/meetanshi.com\/blog\/magento-2-4-2-release\/\" target=\"_blank\" rel=\"noreferrer noopener\"><em><strong>Magento 2.4.2<\/strong><\/em><\/a>&nbsp;released on February 09, 2021.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Experts recommend\u00a0<a href=\"https:\/\/meetanshi.com\/magento-upgrade-service.html\" target=\"_blank\" rel=\"noreferrer noopener\">upgrading to the latest Magento 2 version<\/a>\u00a0asap in order to not only leverage the latest enhancements in performance but also improve the security of the store!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2021\/03\/unlock-admin-user.jpg\" alt=\"unlock error message\" class=\"wp-image-13757\" style=\"width:349px;height:auto\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">If your admin login is not working properly after installing Magento 2.4.2 on localhost, I can relate!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I faced the same issue and implemented the below solution to resolve it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If your Magento 2.4.2 admin login is not working on localhost, it is because the libsodium extension of apache is not enabled.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to Solve Magento 2.4.2 Admin Login Not Working on Localhost:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">1. Add&nbsp;extension=sodium&nbsp;to php.ini<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2. Copy php\/<a href=\"https:\/\/drops.meetanshi.com\/SsiAnR\" target=\"_blank\" rel=\"noreferrer noopener\">libsodium.dll<\/a>&nbsp;to apache\/bin\/<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3. Restart Server<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Many of the merchants also reported a common issue that caused the \u2018<a href=\"https:\/\/meetanshi.com\/blog\/solution-to-widget-getproductid-is-not-a-function-error-in-magento-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">Widget.getProductId is Not a Function<\/a>\u2018 error on the product page after upgrading to Magento 2.4.2.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, share the post with the Magento Community via social media.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Magento 2.4.2&nbsp;released on February 09, 2021. Experts recommend\u00a0upgrading to the latest Magento 2 version\u00a0asap in order to not only leverage the latest enhancements in performance&#8230;<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-1680","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=1680"}],"version-history":[{"count":3,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1680\/revisions"}],"predecessor-version":[{"id":21393,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1680\/revisions\/21393"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=1680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=1680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=1680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}