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
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.
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,
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.