2

enter image description here

enter image description here

I use all the methods available on google but nothing worked. Same issue is showing again and again.

After running this command: php bin/magento info:adminuri. It does not show the admin url.

halfer
  • 19,824
  • 17
  • 99
  • 186
Huma Saleem
  • 31
  • 1
  • 4
  • Could you please share some of your methods that you already tried, because there are a lot of reasons why (admin url is not found)? Have you already tried this [link](https://amasty.com/knowledge-base/magento-2-backend-is-not-working.html) and what's the URL of your admin page? – Adeel Mar 09 '18 at 16:30
  • Try this: `php bin/magento info:adminuri` `Admin URI: /admin` – Adeel Mar 09 '18 at 16:30
  • my url address is : http://magento.local/admin – Huma Saleem Mar 09 '18 at 17:24
  • php bin/magento cache:clean , rm -rf var/cache/* , rm -rf var/generation/* , this commands i tried and that's another link i tried : https://magento.stackexchange.com/questions/133679/404-not-found-error-for-admin-page. plz tell me if you find something . thanks – Huma Saleem Mar 09 '18 at 17:28
  • Please check app/etc/env.php file and search for 'backend' => array ( 'frontName' => 'admin', ), is it admin or something else? – Adeel Mar 09 '18 at 18:23
  • Try this http://magento2.local/index.php/admin if it doesn’t work too then please share error log – Adeel Mar 09 '18 at 18:28

2 Answers2

5
  1. Check for the admin URL in the app/etc/env.php. For example, it can be something like this (Is it frontName empty in your case?). Change the frontname to your preference, clean cache and try again.

    return array (
      'backend' => 
      array (
        'frontName' => 'admin_1onald',
      ),
  2. Check the core_config_data table to find if admin url has been changed from the admin panel

    select * from core_config_data where path like '%custom%';

check if there are any records for

- admin/url/use_custom - admin/url/custom - admin/url/use_custom_path - admin/url/custom_path

If any, adjust > cache clean > try again

Dilhan Maduranga
  • 2,201
  • 1
  • 16
  • 12
  • return array ( 'backend' => array ( 'frontName' => 'admin_1onald', ), i also try this method but nothing happened. and for these admin/url/use_custom admin/url/custom admin/url/use_custom_path admin/url/custom_path there are no records in my database. – Huma Saleem Mar 10 '18 at 19:48
0

Change the admin URL of your store. Run the following command in the root directory of your store:

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

In the above command, I have set the admin name newadmin so to access the admin panel add /newadmin with your store URL.