How to change Magento 1.9 admin password and website domain name ?
If you want to change your Magento 1.9 admin password and magento website’s domain name then save this interative script as script.sh and execute on your magento server.
echo "Enter Your New Site Domain Name -: " read dname echo "Please Re-Enter Your New Site Domain Name -: " read rdname if [ "$dname" != "$rdname" ] then echo "Domain Name Doesn't Match, Please try again" ./script exit; fi echo "Enter Your New Magento Admin Password -: " read madminpass echo "Please Re-Enter Your New Magento Admin Password -: " read rmadminpass if [ "$madminpass" != "$rmadminpass" ] then echo "Password Doesn't Match, Please try again" ./script exit; fi echo "Enter Your MySQL Password -: " read pass echo "Please Re-Enter Your MySQL Password -: " read rpass if [ "$pass" != "$rpass" ] then echo "Password Doesn't Match, Please try again" ./script exit; fi mysql -u root -p$pass magento -e "update core_config_data set value = 'http://$dname/' where path = 'web/unsecure/base_url';" mysql -u root -p$pass magento -e "update core_config_data set value = 'http://$dname/' where path = 'web/secure/base_url';" mysql -u root -p$pass magento -e "UPDATE admin_user SET password = CONCAT(MD5('34$madminpass'), ':34') WHERE username = 'admin';" sudo rm -rf /var/www/html/var/cache/* sudo rm -rf /var/www/html/var/session/*
If result is not found or irrelevant, Please contact us.
Submit your request