Correct way to change the magento 1.9 admin url

Correct way to change the Magento 1.9 admin url

anyone can provide me the correct way. I see a lot of different suggestion online.

Solutions

corect way is to do through local.xml file

<admin>
   <routers>
      <adminhtml>
        <args>
            <frontName><![CDATA[admin]]></frontName>
        </args>
    </adminhtml>
</routers>

before

 <frontName><![CDATA[admin]]></frontName>

after

 <frontName><![CDATA[backend]]></frontName>

Then you have to delete all cache content through dir var/cache

As per my opinon web interface is additonal option because it may cause you some problem like later you won't able get admin after your changes if you will change the option "Use Custom Admin URL" to yes and set "Custom Admin URL" value and save your changes.Generally every user makes mistake this type.You can see the image to know which one should change if you choosing web interface setting.

enter image description here

for more details about this visit this site

How to change magento admin URL

NOTE: If you have changed the admin url by using the admin backend and lost access, use the steps here to regain access.

How to properly change the Admin Base URL so you don't have to follow the above link.

Never use the System=>Config=>Advanced=>Admin=>Admin Base URL settings to do this. It usually ends up in site fubar.

Every local.xml has the fix sitting right there staring us in the face. Find this section:

 <admin>
    <routers>
        <adminhtml>
            <args>
                <frontName><![CDATA[admin]]></frontName>
            </args>
        </adminhtml>
    </routers>
 </admin>

Save a copy to your local workstation so you can recover if you mess up and then change this line as follows giving somethingelse your own particular branding:

 <frontName><![CDATA[somethingelse]]></frontName>

Then refresh Magento cache by one of two methods so Magento re-reads the configuration to include your change.

  1. Go into backend System=>Cache Management and click the Flush Magento Cache button.

  2. Manually, using your SCP/SFTP client, log into the Magento file system, find the var/cache/ directory and delete all the cache--? subdirectories (question mark stands for the 0 through f increment number at the end)


Why it's not a good idea to use the System=>Config=>Advanced=>Admin=>Admin Base URL settings area to do this, unless A) you understand their function, B) you understand how to recover if you make the wrong choice.

  1. If you mess up, you lose ability to log into the Admin Panel Backend and will need to mess around with 3-5 rows in the core_config_data to get back in. It's easier to use the old, reliable method of just editing a text file.

  2. Naming conventions in the Admin Base URL section have always been arcane and one of them is not for common use as it's for Node Clustering where the Admin backend may be running on a sub-domain, not the internet facing public web server. Setting this one Use Custom Admin URL, removes access to your Admin Backend.

  3. If you're proficient with phpMyAdmin or MySQL commands and aren't worried by tracing down what's necessary to get the admin backend accessible again, below is the proper setting to change the Use Custom Admin Path setting as depicted.

Clear cache, YMMV, "Do not pass Go, Do not collect $200", Warranty void where prohibited, et.al. and you now should be able to access the Admin backend with the new route path you entered.

enter image description here

If you want to do it programatically (by installer) use this:

$installer = $this;
$installer->startSetup();

$installer->setConfigData('admin/url/use_custom_path','1');
$installer->setConfigData('admin/url/custom_path','csradmin');

$installer->endSetup();
Tags: Magento 1.x / Admin / Url

Similar questions

what was the correct way to update file for admin html module-backend?
i want to change in file location : /var/www/html/vendor/magento/module-backend/view/adminhtml/templates/media/Uploader.php but its core file. I'm changing MAX_IMAGE_HEIGHT and MAX_IMAGE_WIDTH in this php file. where to update this file, the correct way . i thinks i should in /var/www/html/app/code/Ves/Setup there are some folders block controller ...
I changed the admin URL path and I need to change it back, but I no longer have access to the admin panel, because I changed the admin URL. :(
I changed the admin URL path and I need to change it back, but I no longer have access to the admin panel, because I changed the admin URL. :( I forget exactly what the input form looked like, so I'm not sure exactly what I did, but as soon as I hit "save" I lost my access to the admin panel. How can I get into the admin panel?
What is the correct way to update a value to be NULL on a Magento model?
I am having an issue getting a custom model's value to update to NULL. This code does not update the field custom_value in the database, and the database value accepts NULL values (Manually setting NULL in the database works fine). EDIT: As Tim mentions below using Zend_Db_Expr("NULL") does set the value to null, could anyone explain why this is re...
magento 1.9 correct way to extend Mage_Adminhtml_Catalog_ProductController
y'all. What is the best way to achieve this epic feat of intellectual prowess? Is this a good start? From that point, what else must be achieved?
What is the correct way/approach to modify a Magento template?
Please suggest me the right approach, I want to customize the "EMAIL to Friend" page into pop up window, when user click on the button (email this product). By enabling template hinting, I found out that the button is rendered with frontend/rwd/default/template/catalog/product/view/sharing.phtml And the corresponding layout file is catalog.xml (in ...
What is the correct way to properly register & run automated cronjobs in Magento 2?
I'm trying to define a cronjob for a custom module, but having a hard time going through the proper flow of scheduled cronjobs. Few things of note:

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.