Changing the Magento default admin URL

Magento installations normally use the URL /admin to access the back-office. To change the admin URL to something different:

  1. Open the/app/etc/local.xml file
  2. In the section
    1. <admin>
    2.     <routers>
    3.         <adminhtml>
    4.             <args>
    5.                 <frontName><![CDATA[admin]]></frontName>
    6.             </args>
    7.         </adminhtml>
    8.     </routers>
    9. </admin>
  3. Change the CDATA value for frontName to the new admin address.
    For example: to change from /admin to /backoffice

    1. <admin>
    2.     <routers>
    3.         <adminhtml>
    4.             <args>
    5.                 <frontName><![CDATA[backoffice]]></frontName>
    6.             </args>
    7.         </adminhtml>
    8.     </routers>
    9. </admin>
  4. Clear the cache by deleting the entries under /var/cache in the file system
  5. Access the backoffice with the new URL
  6. References