Search blog

Wednesday, December 14, 2016

Change Admin URI/URL in Magento 2 using Terminal or Admin Page

First and foremost never change your Admin URI directly from the 'env.php' page because that alone isn't sufficient to change/update the URI. Best is to use the terminal because along with the URI value in the 'env.php' file, you will also have to change/update the following database values:
  • db-engine
  • db-model
  • db-init-statements
If you update the admin-uri values using the terminal below is what you get:

Change Admin URI/URL in Magento 2 using Terminal or Admin Page
Click on image to enlarge
1. Change Magento 2 Admin URI/URL FROM CLI/Terminal:

  php bin/magento setup:config:set --backend-frontname="your_admin_path"  
Note: No forward slash at the front or back of your path admin path.
Example:
  php bin/magento setup:config:set --backend-frontname="vXc12eR_1991"  

Note: Please do not use names such as 'admin' or your store name in the Admin URL.

1. Change Magento 2 Admin URI/URL FROM Store Back End:

 Click on STORES > Configuraiton > Advanced > Admin. Please view image below for example:

No comments:

Post a Comment

Thank you for your Feedback!
www.evagabond.me

Top 5 Posts (Weekly)