I'm having a weird issue trying to figure out which database my staging site (staging.domain.com) is connecting too. On my staging site, craft is up-to-date, but does not show the latest changes I made (added a new section and updated craft), which makes me think it's using the live database. However, if it's using the live DB, it should show craft as needing updates? All the other changes on the staging site are working fine (ie. tmpl & css updates).
So to troubleshoot, I added devMode
to my staging site array to see if my keys were working properly. This added the devMode
strip to the top of the CP. Next, I double checked both database on the server to make sure they were different. The staging DB has the new section I just added. Lastly, I cleared the cache to see if that made a difference.
Am I totally missing something here?
general.php:
return array(
'*' => array(
'cpTrigger' => 'cp-admin',
'omitScriptNameInUrls' => true,
'environmentVariables' => array(
'basePath' => $base_path,
'baseUrl' => $base_url
)
),
'.dev' => array(
'devMode' => true,
),
'stage.' => array(
'devMode' => true,
),
'.com' => array(
'cooldownDuration' => 0,
)
);
db.php:
return array(
'*' => array(
'tablePrefix' => 'craft',
),
'.dev' => array(
'server' => 'localhost',
'user' => 'root',
'password' => 'root',
'database' => '***pa_craft',
),
'stage.' => array(
'server' => 'localhost',
'user' => '***pa',
'password' => '***',
'database' => '***pa_craft',
),
'.com' => array(
'server' => 'localhost',
'user' => '***pa',
'password' => '***',
'database' => '***pa_craft_live',
),
);
Update
I just switched my local setup (dev) to point to the remote staging DB which connects and shows the updates. I also added a new entry to check to see if was writing to the correct DB.