0

After reading some online guideline, I tried changing my Magento admin url.

I found it at Stores-->Configuration--> Advanced-->Admin base url.

I decided to change the admin url but didnt include the "/". Now my admin urls(both old and new) returns a "404 NOT FOUND" page.

Already tried using ssh commands but to no effect including:

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

I need help correcting this error. My current magento version is 2.1.9

3
  • Did you clear cache after Changing it? If you did and still not working, check in core_config_data table and try to change that field value. Hope you know how to find the value in the table and replace it. Feb 20, 2018 at 17:00
  • Yes i did clear the cache. What field value am I to change in the core_config_data table as i do not see anything similar Feb 21, 2018 at 8:37
  • I don't think Magento 2 stores this information in the database but for sure it can be found in app/etc/env.php
    – Greg
    Feb 21, 2018 at 8:57

1 Answer 1

0

Open file app/etc/env.php and change that:

  'backend' => 
  array (
    'frontName' => 'admin',
  ),

After that run these commands:

rm -rf var/cache/*
php bin/magento cache:clean
php bin/magento cache:flush
5
  • I tried that still getting the same error page Feb 21, 2018 at 8:50
  • what does it say in that file?
    – Greg
    Feb 21, 2018 at 8:54
  • Try to run this command to see if the changes reflect: php bin/magento info:adminuri
    – Greg
    Feb 21, 2018 at 8:55
  • the changes reflect Feb 21, 2018 at 9:39
  • Run php bin/magento setup:upgrade and php bin/magento setup:di:compile from Magento root
    – Greg
    Feb 21, 2018 at 9:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.