Magento Expert Forum - Improve your Magento experience

Results 1 to 2 of 2

How to Change Admin URL in Magento 2

  1. #1

  2. #2
    Junior Member
    Join Date
    Aug 2018
    Location
    Indore,India
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Method 1: Change from the Magento Admin:
    Firstly, on the Admin sidebar, tap Stores and choose Configuration. In the panel on the left, under Advanced, choose Admin and expand the Admin Base URL section. Then, do the following:

    Set Use Custom Admin URL to “Yes.” Then, enter the Custom Admin URL in the following format:
    http://yourdomain.com/magento/
    (Important! The Admin URL must be in the same Magento installation, and have the same document root as the storefront.)
    Set Custom Admin Path to “Yes.” Then, enter the Custom Admin Path. The path that you enter is appended to the Custom Admin URL after the last forward slash.
    sample_custom_admin

    Magento 2 change Admin URL

    Admin Base URL

    When complete, tap Save Config. After the changes are saved, you must log in to the Admin using the new Admin URL and path.

    Method 2: Change from the Server Command Line
    Open the app/etc/env.php file in a text editor, and change the name of the [admin] path. Make sure to use only lowercase characters. Then, save the file. On the server, the admin path is located in the app/etc/env.php file. Look for the <adminhtml> argument in the <admin> section:

    Default Admin Path: # <frontName><![CDATA[admin]]></frontName>
    New Admin Path: # <frontName><![CDATA[backend]]></frontName>
    Then, use one of the following methods to clear the Magento cache:

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •