Welcome Guest, Not a member yet? Register   Sign In
Codeigniter Multiple databases or Multisite installation


We are running or App on a server using PHP5, Apache2, MySQL with 24GB of RAM, i7-920 Quadcore and lots of disk space.

We are building an app that registers a user and then a user gets its own database to manage his data (insert, update, delete).

Now how in Codeigniter's view, app design would be optimized:

1) One Codeigniter installation with multiple databases (every user has its own database).
2) Multiple Codeigniter installation (every user has one installation) with his own database.

In which case we could have an high performing app and server many-many users.

Thanks for everyone,


Definitely 1. With 2, you would need a virtual host for every user! Plus all the file duplicates (you could symlink I suppose.)

You might also look into nginx and fpm. http://interfacelab.com/nginx-php-fpm-apc-awesome/

+1 for first solution Smile


When using nginx my only concern is how to use the .htaccess file?

Currently looks like:

Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|js|css|images|captcha|font)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?$1 [L]

Put this in your location / {}

# this sends all non-existing file or directory requests to index.php
if (!-e $request_filename) {
    rewrite ^(.+)$ /index.php?q=$1 last;

Theme © iAndrew 2016 - Forum software by © MyBB