This action might not be possible to undo. Are you sure you want to continue?
This tutorial will show you how to fix some of the most common issues that Joomla users experience.
It covers the following topics:
y How to resolve a Database Error: Unable to connect to the database:Could not connect to database
y How to fix the issue with your menu items opening a 404 Page Not Found error;
y How to add your module into the desired position even if the position is not available in the Position drop-
y How to resolve an Error:"xml file is missing in package" issue when installing a new template;
y How to fix an issue with a "MySQL Server has gone away" error while installing a new extension;
y How to resolve an '404 - Component not found' error in Joomla 1.5;
If you encounter the following error when browsing your website:
Database Error: Unable to connect to the database:Could not connect to database
You should check the configuration.php file of your Joomla application and make sure the following lines are
var $dbtype = 'mysql';
var $host = 'localhost';
var $user = 'user_jo151';
var $password = 'YourPassword';
var $db = 'user_jo151';
var $dbprefix = 'jos_';
You should make sure you are using the correct MySQL username and database in your configuration.php file.
You can use the MySQL Databases tool in your cPanel in order to check the correct username and database for
In addition, make sure that your MySQL username is added to your database. More information on that matter
can be found in our tutorial on How to create a MySQL database and user.
This issue can also be caused by errors within the database itself. In such cases you can try restoring your
For more information on how to do this you can refer to our tutorial on How to backup and restore a MySQL
Your main website looks fine but all of your links return a "404 Page Not Found" error.
Such issues are usually caused by the SEF functionality of Joomla. There are several things you should check in
order to fix this:
y Open your configuration.php file and edit the var $live_site = ' '; line to match the actual URL of your
website. If your website is http://yourdomain.com for example, the line should look like this:
var $live_site = 'http://yourdomain.com ';
y Go to the administrative end of your Joomla website -> Global Configuration and make sure that
both Search Engine Friendly URLs and Use Apache mod_rewrite are set to Yes.
y Make sure you have renamed the htaccess.txt file in your Joomla folder to .htaccess.
If you follow all of the steps above you should have a fully operational Joomla website with the SEF functionality
enabled. For testing purposes you can temporarily disable the Search Engine Friendly URLs in order to check
whether they are the cause for your issues.
If you want to publish a module in a certain position but you can't find it in the "Position" drop-down menu,
you can simply type it. For example, if you want to publish a menu in the "user3" position and it is not in the list,
you can simply typeuser3 in the field. Joomla displays only the positions that have published modules in them.
Therefore, if the position is defined in the template you are using you can safely type it even if it is not shown in
the Position options.
If you receive an Error:"xml file is missing in package" when installing a new template, first check
whether it is designed for Joomla 1.5. If it is created for Joomla 1.0 you can try enabling the Joomla Legacy
plugin. For more information on how to do that you can check this article. Another reason for this issue could be
that the archive you are trying to install contains the actual installation package; i.e. there is an archive within
the archive. The solution is simple - you should extract the archive and install the actual installation package.
When installing a new extension you may receive a "MySQL Server has gone away" error. Usually this
error occurs when you try to install a big extension and you have the FTP Layer of your Joomla application
enabled. As a workaround you can disable the FTP Layer by logging to your Administrative area -> Global
Configuration -> Server -> FTP Settings. There set the value of "Enable FTP" to "No". Then try installing
your extension again.
If you receive a '404 - Component not found' error in Joomla 1.5 error when going to your main page
you should check whether you have a default menu item published. Joomla needs a default item for the front
page. In order to do this, go to your admin area -> Menus -> Your main menu. Then select the menu item that
you want to be loaded when you visit your main page and click on the "Default" button at the top-right of the
You can submit new topics/issues/solutions using the "Feedback" button at the top of this page.
RECOMMENDED: jHackGuard - Joomla 1.5 Plugin
As an addition to the security tips given in this tutorial we have developed a plugin to further protect your Joomla
websites! We still advise you to follow the steps explained below to make sure your Joomla website is safe. More
info about jHackGuard...
The purpose of this tutorial is to show you how to secure your Joomla website. There are several steps you can
take to protect your Joomla application. Joomla's security can be improved significantly by following these simple
y Change the administrative username of your Joomla
y Change the default table prefix of your Joomla database
y Password protect your Joomla administrative area
y Keep your Joomla up-to-date
y Use the .htaccess file to additionally secure Joomla
How to 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
Now you can login to the administrative area of your Joomla application with the new username.
How to 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
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
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.
Password protect your administrative area
Password protecting the "administrator" folder will add an additional layer of protection to your Joomla website.
For more information on how to do that you should refer to our tutorial on How to password protect directories.
You should set username and password for your website different from the ones for your Joomla application.
Once you do this, you will have to login twice. First to access the login page of Joomla and then to login in the
That would make guessing your passwords a very difficult task for any attacker. In addition, even if there is a
security breach within the Joomla script itself, a potential attacker won't be able to gain access to your
administrative end even if s/he knows your login details.
Keep your website up-to-date
You should always keep your Joomla application up-to-date. We recommend you to subscribe to the Joomla
newsletter in order to receive news about new versions. You can do this at Joomla's official download page.
Once you receive a notification that a new version of Joomla is released, you should upgrade your website
immediately. For detailed information on how to upgrade your site, you can refer to our Joomla upgrade
y How to upgrade Joomla 1.0.x
y How to upgrade Joomla 1.5.x
If your website is running Joomla 1.0.x it is recommended to migrate it to Joomla 1.5.x. In Joomla 1.5 there are
many security improvements in the core elements of the application. The migration, however, should be
performed with caution. You should always backup your Joomla before proceeding with the upgrade. For more
information you can check our tutorial on How to upgrade from Joomla 1.0.x to Joomla 1.5.
Use the .htaccess file to additionally secure your Joomla
You should make the following changes to the .htaccess file in the Joomla directory:
y First, If you don't have a .htaccess file in your Joomla folder, you should rename the htaccess.txt file
that comes with your Joomla installation package to .htaccess. To do this, you can use the File Manager
tool in your cPanel. In addition, doing this will allow you to enable the SEF functionality of your Joomla
application. The rules in it will block the majority of well-known attacks against your website.
y Make sure you are running your website on PHP 5.2 or newer. All SiteGround customers have their
accounts running PHP 5.2 by default.
y Block the access to all files except index.php and index2.php. Note, however, that you may have to allow
the access to some additional files if your extensions require them. If certain parts of your website do not
appear, you can check the files that they rely on. Then, you can add them to the access rules. Generally,
if you add the following lines to your .htaccess file, everything should work just fine:
The SiteGround Web Hosting servers are perfectly optimized and secured in order to provide you with the best
environment for your Joomla website. Please do not hesitate to contact us if you have any questions regarding
the security of your Joomla website.
This action might not be possible to undo. Are you sure you want to continue?