Aug
28
2011

Changing Magento Admin Path Post Install

I made the mistake today of installing my latest Magento site  using the default admin path. Being a fan of security through obscurity, I wanted to change this!  Here’s how to do it:

First: Change the Admin Path

Change the word admin path in app/etc/local.xml to something more obscure.

 Text |  copy code |? 
1
<admin>
2
  <routers>
3
    <adminhtml>
4
      <args>
5
        <frontName><![CDATA[admin]]></frontName>
6
      </args>
7
    </adminhtml>
8
  </routers>
9
</admin>

Finally: Refresh the Magento cache

All files within the /var/cache directory need to be removed.  This can be done via ftp, or the following ssh command:

(First, navigate to you Magento root directory)

 Text |  copy code |? 
1
rm -rf var/cache

Job done !

About the Author:

Leave a comment