We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Two Installs with One Shared Database

Development and Programming

ultra16's avatar
ultra16
9 posts
13 years ago
ultra16's avatar ultra16

We’re developing a site and want to share a single DB between a development machine and our staging server. What we’ve done is set up tunneling to allow our development machine to connect to the DB on the staging server.

The problem we have is that EE is storing the config.php information for the site root info in the database, so we can’t maintain two separate URLs for the machine to work on. Is there a way to only use the config.php file for this information?

The reason we have this setup is because we now need the staging site’s database to be populated while the development machine continues to work on the site locally. We don’t want the development machine to work directly off the staging site, except via a shared Database.

Edit: I guess I’m wondering is if in the config.php, under ‘base_url’ can EE use what is in there rather than the database value for the field?

Thanks

       
ultra16's avatar
ultra16
9 posts
13 years ago
ultra16's avatar ultra16

So it wasn’t base_url but it was actually site_url that was creating the links.

I realized I could add that into the config.php file so adding in an entry for $config[‘site_url’] and $config[‘theme_folder_url’] did the trick!

Now each server has the unique URL with it set in the config file while they share the same DB.

       
ultra16's avatar
ultra16
9 posts
13 years ago
ultra16's avatar ultra16

I’ve run into another problem with {auto_path}. {auto_path} is taking the site_url from the database and not from the config.php file.

Is this known behavior or a bug? Thanks

       
MDB's avatar
MDB
83 posts
13 years ago
MDB's avatar MDB

Isn’t this scenario something that Multiple Site Manager is good for?

       
Dan Decker's avatar
Dan Decker
7,338 posts
13 years ago
Dan Decker's avatar Dan Decker

Hi ultra16,

This is exactly the scenario that Bootstrap Configs were developed to solve. While outside technical support scope, check out the Focus Lab Master Config.

With that, I’ll move this on over to Development and Programming for more discussion.

Cheers,

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.