Blog Archives

How to Change the Admin URL in Magento 2

Change Admin Path

It is not recommended to change it directly from app/etc/env.php, always prefer the CLI:

php bin/magento setup:config:set --backend-frontname="admin_path"

Do not add the first / in the admin_path as it will result in an invalid parameter exception.

Change Admin URL

This can be done via the admin under Store > Advanced Tab > Admin Base URL section

Read more →