News Feed E-mail

Get How-To's right in your inbox. Subscribe to the HowToJoomla! news feed e-mail. Just enter your email address here:

Delivered by FeedBurner

Login






Lost Password?
No account yet? Register

Affiliates

Azrul's JomComment
JoomlaShack
iJoomla
The Joomla! Store
Member of W3C Sites dot com
Installing Multiple Instances of Joomla! With 1 Database PDF Print E-mail
Written by Cory   
Friday, 22 September 2006

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.

Trackback(0)
Comments (2)add comment
john: ...
hi,

What kind of blogs are u using?
I liked it so much..
1

report abuse
vote down
vote up
August 01, 2007
Votes: +0
Marcosll: ...
Thank you this is exactly what I was looking for for my site.
2

report abuse
vote down
vote up
September 27, 2007
Votes: +1

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

busy
 
Tag it:
Delicious
Digg
Technorati
< Prev
iJoomla

About HowToJoomla

HowToJoomla was started in September 2006 by me, Cory Webb, a long-time Mambo/Joomla user with a desire to give back to the community that has given so much to him.

HowToJoomla is not the best, most comprehensive Joomla tips site out there. That's not the goal. The goal is to share some of the knowledge and experience that I have gained through years of using the world's best content managment system. I hope that you will find this site useful and visit often. As I come across new tips and ideas, I will post them here for all to see.

I hope you enjoy using HowToJoomla and find it very useful.

Please take some time to read the Disclaimer.

Thanks for visiting!

About Me

I am a 28-year-old husband and father of a beautiful baby girl named Lucy. I have a degree in Electrical Engineering from the University of Texas at Austin, an MBA from Baylor University, and over 4 years experience working with the Mambo/Joomla CMS.

On February 1, 2008, I started a web design, development, and consulting company specializing in designing and developing custom Joomla-powered websites. The new company is aptly named Cory Webb Media, LLC. The double meaning is purely unintentional, but with a last name like "Webb" it is difficult to escape the obvious puns. If you are looking for professional assistance with your website, please feel free to contact me to discuss your project.

I also run HowToJoomla, CoryWebb.com (my personal website/blog), and JoomlaForm.com (a site dedicated to promoting good design in the Joomla! community). In my spare time (if there is such a thing), I volunteer with the youth ministry at my church.

Copyright © 2006 - Cory Webb Media, LLC - All rights reserved.
Powered by Joomla!