If you would like to 'sort of' rename your Joomla administrator directory without having to modify any Joomla code or you don't want to have to use htpasswd to protect that directory, you can achieve it the following way.
This may help limit issues for joomla security in the future.
Create a new directory in your root directory (eg. "myadmin")
Create an index.php file in your "myadmin" directory..
$admin_cookie_code="1234567890";
setcookie("JoomlaAdminSession",$admin_cookie_code,0,"/");
header("Location: ../administrator/index.php");
?>
Add this to .htaccess of your real Joomla administrator directory
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/administrator
RewriteCond %{HTTP_COOKIE} !JoomlaAdminSession=1234567890
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.
Needless to say, you would choose another directory name for "myadmin" and change the cookie code "1234567890" to something else. Security through obfuscation is no substitute for the real thing but this might make you feel a little better.
http://www.joomlahackers.net/joomla-tutorials/change-joomla-admin-name-or-path.html
Saturday, April 7, 2012
How to reset my Joomla administrator password?
Joomla's admin username can be easily changed with a simple MySQL query. The most convenient way to manage the database is through the phpMyAdmin tool. Go to your cPanel and click on phpMyAdmin in the Databases box. (If you are not using cPanel or do not have phpMyAdmin, you can run the query directly for Joomla's database.)
Once in the phpMyAdmin select the Joomla database from the drop-down menu at left. The page will refresh and the database's tables will be displayed on it. Open the SQL tab (look at the top navigation bar).
In the text field write the following SQL query:
UPDATE `jos_users` SET `password` = MD5( 'new_password' ) WHERE `jos_users`.`username` = "admin" ;
"new_password" - replace this with the new password you wish to use.
"admin" - replace this if your admin username is different.
Once you are ready, click on the GO button to submit the query. If everything goes fine without errors, you should be able to login to Joomla with the new password.
Note: These instructions are valid both for Joomla 1.5 and Joomla 1.0.*.
Once in the phpMyAdmin select the Joomla database from the drop-down menu at left. The page will refresh and the database's tables will be displayed on it. Open the SQL tab (look at the top navigation bar).
In the text field write the following SQL query:
UPDATE `jos_users` SET `password` = MD5( 'new_password' ) WHERE `jos_users`.`username` = "admin" ;
"new_password" - replace this with the new password you wish to use.
"admin" - replace this if your admin username is different.
Once you are ready, click on the GO button to submit the query. If everything goes fine without errors, you should be able to login to Joomla with the new password.
Note: These instructions are valid both for Joomla 1.5 and Joomla 1.0.*.
How to move Joomla to another directory?
Many web designers prefer to build their websites in test folders and when their development is over to move their Joomla applications to the root folder of their hosting accounts.
For the purpose of this article let us presume that we have a Joomla 1.5 installed in the public_html/test folder in our account and we want to move it to the public_html directory so that it will be directly accessible through www.yourdomain.com.
This change consists of the following steps:
1. Move all of the files and folders from your Joomla folder to the new directory. In our case from public_html/test to public_html
2. Reconfigure your application. You should edit your configuration.php file and make the following changes in it:
Change: var $log_path = '/home/user/public_html/test/logs';
To: var $log_path = '/home/user/public_html/logs';
Change: var $tmp_path = '/home/user/public_html/test/tmp';
To: var $tmp_path = '/home/user/public_html/tmp';
Change: var $ftp_root = '/public_html/test';
To: var $ftp_root = '/public_html';
Change: var $live_site = 'http://www.yourdomain.com/test';
To: var $live_site = 'http://www.yourdomain.com';
3. Remove the content of your cache folder (public_html/cache in our case)
Now when you reload your website it should be working flawlessly from its new location.
For the purpose of this article let us presume that we have a Joomla 1.5 installed in the public_html/test folder in our account and we want to move it to the public_html directory so that it will be directly accessible through www.yourdomain.com.
This change consists of the following steps:
1. Move all of the files and folders from your Joomla folder to the new directory. In our case from public_html/test to public_html
2. Reconfigure your application. You should edit your configuration.php file and make the following changes in it:
Change: var $log_path = '/home/user/public_html/test/logs';
To: var $log_path = '/home/user/public_html/logs';
Change: var $tmp_path = '/home/user/public_html/test/tmp';
To: var $tmp_path = '/home/user/public_html/tmp';
Change: var $ftp_root = '/public_html/test';
To: var $ftp_root = '/public_html';
Change: var $live_site = 'http://www.yourdomain.com/test';
To: var $live_site = 'http://www.yourdomain.com';
3. Remove the content of your cache folder (public_html/cache in our case)
Now when you reload your website it should be working flawlessly from its new location.
Subscribe to:
Posts (Atom)