Magento 2 Enable SSL

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.

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *