Thursday, April 18, 2013

Change the Default Table Prefix of your Joomla database


Changing the default table prefix will stop the majority of attacks against your database. You can use the DB Admin component in order to do this. Although it is originally designed for Joomla 1.0.x, it works on Joomla 1.5 too.



 Step 1. Install the component and go to Components > DB Admin.

 Step 2. Using the intuitive interface, change the default "jos_" prefix of your Joomla 1.5 tables to a different value.

 Step 3. Modify the configuration.php file in your main Joomla folder. In it locate the following line:
var $dbprefix = 'jos_';
You will have to edit it to correspond to the new table prefix you have set. For example, if you have changed the table prefix to "smth_" the line in the configuration.php file should look like this:
var $dbprefix = 'smth_';
The default table prefix of your Joomla database is now changed. This should block the majority of attacks against your database.


Change the Administrative Username of Your Joomla website


By default your administrative username is admin. The majority of the attackers would expect the username to be admin. Changing it will protect you against many attacks.
To do this, you should:

 Step 1. Log in to the Joomla administrative area and click on the User Manager menu.


 Step 2. Click on your administrative user in order to edit it. You can either check the box next to the user and click the "Edit" button or directly click on the user's full name.


 Step 3. In the next page you should edit the Username field. Change it to something different than "admin" and click on the "Save" button.


Alternatively, you can do this by modifying the database of your Joomla website:

 Step 1. Open the phpMyAdmin tool in your cPanel and load your Joomla database.

 Step 2. Select the jos_users table from the left column and click on the Browse button to edit the rows in it.


 Step 3. Locate the line for the "admin" username and click on the pen icon next to it to edit it.


 Step 4. Change the value of the "username" field to something different than "admin". Using lower and upper case characters as well as numbers is highly recommended.

 Step 5. Once you change your administrative username, press the Go button at the bottom right part of the page.


Now you can login to the administrative area of your Joomla application with the new username.