cancel
Showing results for 
Search instead for 
Did you mean: 

Messed up my admin URL now can't access admin panel

Highlighted

Messed up my admin URL now can't access admin panel

Not sure where to start with this,

 

Currently hosting a magento 2.2.6 site on platform.sh and tried to change the admin path (i.e. from /admin to /adminXhjgds) in the backend (Stores > Configuration > Advanced > Admin) but after I clicked save I am not getting a 404 for both /admin and /adminXhjgds.

 

So really my question is, how can I restore my admin URL to the default?

 

I've tried php bin/magento setup:config:set --backend-frontname="admin_path" and editing my env.php, neither of which worked.

 

Thanks

3 REPLIES 3
Highlighted

Re: Messed up my admin URL now can't access admin panel

Hello @guesty1234

 

You can check current admin url using below command:

 

php bin/magento info:adminuri

 

You can also view the Admin URI in <your Magento install dir>/app/etc/env.php. A snippet follows:

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

OR 

open your core_config_data table. You have four or more rows to edit.

Find admin/url/use_custom and set to 0

 

Now run Cache flush command:

php bin/magento cache:flush, try now. Cheers

Manish Mittal
https://www.manishmittal.com/
Highlighted

Re: Messed up my admin URL now can't access admin panel

I tried all your steps, but the admin (backend) does still not load and shows me the 404 site

Highlighted

Re: Messed up my admin URL now can't access admin panel

@Eddcapone this was very old issue, might be you have something different issue please share it in details. Thanks

Manish Mittal
https://www.manishmittal.com/