Site icon MageComp Blog

How to Change Magento 2 Admin URL (3 Methods)

Hello Magento Friends,

Today we will learn three ways to change the admin URL in Magento 2. First, let’s start with the basics of the Admin URL and the reasons to change it.

What is the Admin URL in Magento 2?

The URL you use to access your Magento store’s admin panel is called Admin URL in Magento 2. The admin URL helps access the store’s backend and perform administrative tasks to view, edit, and manage order data, customer data, product catalog, store settings, extensions, and more. When you install Magento 2, it automatically creates your admin URL with some random string. The default admin URL in Magento 2 is yourdomain.com/magento/admin. 

Reasons to Change Magento 2 Admin URL:

Things to Know Before Changing the Admin URL in Magento 2:

Ways to Change Magento 2 Admin URL:

You can change the admin URL of your Magento 2 store using any of the below mentioned three methods:

Method – 1 Change Admin URL using Admin Panel

At last, click Save Config to save the changes. Then logout from the admin panel and log in again using the new URL.

Method – 2 Change Admin URL through Command Line

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

Method – 3 Change Admin URL by Editing the Env.php File

Wrapping Up:

Hence, these were the 3 ways to change the admin URL in Magento 2. Fix 404 Error Page Not Found in Admin URL in Magento 2. If you face difficulty altering the admin URL, you can connect with our Magento Developers to help you with it. 

Happy Reading!

Exit mobile version