I just recently installed Joomla! using a database that already had an instance of Joomla! installed in it. It was actually really easy. This article explains how to install multiple instances of Joomla! with 1 database.

Why is this useful?

These days, you can find affordable hosting providers that allow you to run as many MySQL databases as you need. The only limitation is the amount of space they take up. However, there are still some hosting providers out there that only allow 1 MySQL database per hosting account. If you want to run 2 or 3 Joomla! sub sites on your account, you have to be able to install all instances of Joomla! on the one database. Luckily, Joomla! makes a provision for this possibility.

Database Table Prefix

By default, the table prefix for a Joomla! site's database is "jos_". This means that each table in your database will be named "jos_tablename". For example, the content table is named "jos_content".

During installation, you have the option to specify a different table prefix. So, if you are installing 3 instances of Joomla! on your server, you might use the following prefixes:

  1. Main Site: "jos_"
  2. Sub Site 1: "sub1_"
  3. Sub Site 2: "sub2_"

You can use any string value you want for the database prefix, provided it is not longer than the pre-defined table name length specified in MySQL. It is not limited to 3 characters and an underscore. You could use something descriptive like "mainsite", "portfolio", and "photogallery". I recommend keeping it short and using an underscore to set the prefix apart from the rest of the table name.

The table prefix is what Joomla! uses to differentiate your Joomla! tables to other tables that might be in your database. It essentially treats the Joomla! tables as a database within a database, set apart by the table prefix.

That's it. You now know how to use 1 MySQL database to install multiple instances of Joomla! on your server. It really is that easy.

Shared Tables for Multiple Joomla! Installations

Sharing tables (like jos_content, jos_users, etc.) between multiple Joomla! installations gets complicated. In fact, it is well beyond the scope of this article. If you are interested in this type of functionality, you might want to check out Multisites Site Manager PRO.

Login to post comments

advertise with us

Boost your traffic and expand your pool of potential customers

8000 active members

Ready to join Now?

CMS Portal - The free marketplace for submitting Joomla, Drupal, Wordpress, Magento, phpBB, Prestashop, vBulletin, Opencart Templates and more.

FOLLOW US

Email Newsletters

Make sure you don't miss interesting happenings by joining our newsletter program.
konya escort eskisehir escort canakkale escort samsun escort balikesir escort aydin escort hatay escort kahramanmaras escort giresun escort tokat escort
Joomla Templates Free Joomla Templates Virtuemart Templates K2 Templates JoomShopping Templates HikaShop Templates SobiPro Templates OpenCart Themes
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes
bettilt
tempobet