Magento – Magento 2 After updating the admin URL getting 404 Not found page

adminbase-urlmagento2magento2.1.5url

I have changed the admin URL using the below command line:

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

I have followed the below answer for change the admin URL:

How to change magento2 admin url?

After that I have gone to check the admin URL stored correct or not in this file
app/etc/env.php .

Also, I have run these commands after update the URL

  1. php bin/magento setup:static-content:deploy
  2. php bin/magento cache:c
  3. php bin/magento cache:f

The URL has changed as expected but now I am getting 404 Not Found page when I go the updated admin URL.

Please suggest if anyone faced this issue in past.

Best Answer

Make sure that after you do the command:

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

You go to the Database and

select * from core_config_data;

and have the correct:

web/unsecure/base_url
web/secure/base_url

with your url. And of course doing the:

php bin/magento cache:flush

after.

Related Topic