voodish logo
Skip to: Content | Navigation | Site map

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

4 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

Leave a comment