Knowledgebase

How to change the URL path of the admin panel in Magento

Magento doesn't have a particular folder on your hosting account that contains all the files and folders for the Magento admin panel. This in turn means the URL of the admin panel doesn't contain the name of any particular folder. The URL path is so to say a virtual one. This path is created during the installation process and by default it's labeled simply admin. So if the homepage of the site is yourdomain.com, then the admin panel will be accessible at yourdomain.com/admin. The admin URL path in this case is just admin (the path is the part that's added to the base URL of the site).

However, if you want to, you can change the URL path of the admin panel. To do this you need to edit the local.xml file of your site. You can do this by downloading the file on your local computer using an FTP client (e.g. FileZilla), editing it with a text editor (e.g. Notepad, Wordpad) and uploading it back overwriting the old file. If the application is installed directly in the public_html folder on your Magento hosting account, meaning the frontend is accessible at yourdomain.com, then the path to the file on your account will be public_html/app/etc/local.xml. After you download it open it with a text editor and find the following:

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

Then in the part:

[CDATA[admin]]

change admin with whatever you want. Save the file and upload it back in the same folder on your hosting account replacing the old file.

Before you can access the admin panel using the new path you have to clear the cache. To do that manually, assuming the root Magento folder is public_html, delete the contents of public_html/var/cache.

Was this answer helpful?

 Print this Article

Also Read