To change my admin_url of Magento I did it first with: Store > Advanced Tab > Admin Base URL section

After that the admin CSS and js weren't working and to solve that I tried it with the command in SSH:

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

now still no js and CSS is loading in the admin. I tried the commands below to solve but there's still no CSS and JS in admin, in frontend everything is working:

php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento setup:static-content:deploy -f  nl_NL
  • Removing static files except .htaccess
  • Reindexing

Changing the following content: Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink To: Magento\Framework\App\View\Asset\MaterializationStrategy\Copy

Can anyone help? Thanks!


1 Answer 1


This problem appears when we set the backend setting for Use Custom Admin URL wrong.

To get rid of this problem, follow the steps mentioned below:

  • Login to the database and open the core_config_data table.
  • Find and remove the row having the path like admin/url/custom.
  • Now find the value where

scope = stores

scope_id = 0

path = web/secure/base_url and web/unsecure/base_url respectively.

and delete these rows.

  • Now, set the value to 0 where you find the path like admin/url/use_custom.

Flush Magento cache and check the backend again. It should be working with the old backend URL again.

Update: After getting back to the old backend URL, if you wish to change the backend URL, just follow the steps below:

  1. Open app/etc/env.php and find the section:
'backend' => [
        'frontName' => 'admin'
  1. Change the value admin to any other value of your choice.

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.