voodish logo
tweet rss book of faces Linked In

How to rename Joomla admin

joomla_logo.jpg

Here’s how to rename your Joomla administrator path to add another level of security (I use that word loosely) to your Joomla install. This method is known as Security through obfuscation and is no substitute for true security, but it all helps in the sea of other Joomla installs out there.

1. Create a new directory in your root directory (eg. “myadmin”)
2. Create an index.php file in your “myadmin” directory..

$admin_cookie_code="5434231426";
setcookie("JoomlaAdminSession",$admin_cookie_code,0,"/");
header("Location: /administrator/index.php");
?>

3. Add this to .htaccess of your real Joomla administrator directory

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/administrator
RewriteCond %{HTTP_COOKIE} !JoomlaAdminSession=5434231426
RewriteRule .* - [L,F]

To enter your Joomla administration page, you point your browser to “http://yoursite.com/myadmin/” The php code will set a cookie that expires at the end of the session and redirect you to your real administration page. No one will be able to load anything from the administrator directory without having gone through the “myadmin” directory first.

Choose another directory name for “myadmin” and change the cookie code “5434231426″ to something else.

Related Articles

Comments RSS Feed

6 Comments

  1. Kobe September 21, 2010

    Thank you for this!

    I read somewhere that leaving the default admin name was a security risk!
    I’m glad to have that off my mind now :)

  2. Go to Top of the page

  3. Sambath March 21, 2011

    I do this but it still work normally when i go www.mysite.com/administrator

    Thanks!

  4. Go to Top of the page

  5. admin March 21, 2011

    @Sambath: Try clearing all caches, and using some alternative numbers, making sure to match up the numbers used in .htaccess and index.php

    If this doesn’t work and you have followed the steps correctly. Send me a mail with your site details, using the contact form, and I’ll take a look for you.

  6. Go to Top of the page

  7. i8 March 25, 2011

    sweet - works perfectly, cheers!

  8. Go to Top of the page

  9. Ola April 1, 2012

    Hello sir, please i installed a joomla 1.7 on ma PC..i am done with the design and development but am having a challenge..i installed it with Joomla as the folder on the www folder in my wamp..now on viewing the source code from the front-end, i kip seeing something like this: /joomla/biskotech/index.php/services/technology/welding-technology..please how can i change the folder called joomla to my own name??i’ll appreciate any urgent response.Thank You

  10. Go to Top of the page

  11. admin April 1, 2012

    @Ola, although this hasn’t got anything to do with the article, to give you some pointers:

    You would need to make changes in your Joomla configuration file, database and possibly other locations, taking into consideration any installed modules during development.

    The easiest way would be to use a search and replace tool on your website folder and also the DB. Textpad is pretty decent for this. Then re-upload your files and DB with the new changes. It’s often easier to create a new live DB and rename the current Joomla folder, so that you have something to fall back on.

    If you can’t get it working; we can be commissioned to fix this for you, just drop me a mail via the contact form.

  12. Go to Top of the page

Leave a comment