I changed the custom admin URL via the admin.

I've set Stores -> Settings: Configuration -> Advanced: Admin -> Admin Base URL -> Use Custom Admin URL to Yes

I've set Stores -> Settings: Configuration -> Advanced: Admin -> Custom Admin URL -> Custom Admin URL to adminxyz

but just after saving it showed me the 404 site.

enter image description here

Now I can't access the admin (backend) anymore:

So I opened phpMyAdmin and noticed that in the table core_config_data the entries with path web/unsecure/base_url and web/secure/base_url changed to adminxyz.

So I changed them back to my domain https://www.example.com/

I also set the of path admin/url/use_custom from 1 to 0.

But I still can't login in the backend.

I already flushed the cache and reindexed.

If I execute php bin/magento info:adminuri then I get:

Admin URI: /adminxyz

I even made this entry in my app/etc/env.php:

return [
    'backend' => [
        'frontName' => 'adminxyz'

3 Answers 3


I deleted all files inside var/cache, now it works again.


use command line interface to set admin URL instead of manually setting it.

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


query Database: select * from core_config_data where path = 'admin/url/custom';

and change path = {your domain}

  • bin/magento setup:config:set --backend-frontname="{optional}" **admin, admin_test,... **
  • bin/magento se:up
  • bin/magento s:s:d -f
  • bin/magento c:f

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.