To enabel SSL on magento 2 site using command line (SSH), first change to the folder where magento installed.
cd /home/yoursite/html
Now run
php bin/magento setup:store-config:set --use-secure=1 --base-url="https://m2.serverok.in" php bin/magento setup:store-config:set --use-secure-admin=1 --base-url="https://m2.serverok.in"
Replace “m2.serverok.in” with your Magento installation Url.
Leave a Reply