Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Error on Site Migration: "SilverStripe Framework requires a $databaseConfig defined."

Go to End

2 Posts   2506 Views


Community Member, 1 Post

21 August 2015 at 12:07pm

Hi, all,

I'm doing something kind of weird. I'm moving my SilverStripe install from a public website to MAMP locally. I've created the db, imported the old db, and copied all the files.

When I viewed the site, I got something along the lines of "/framework/main.php" not found, so I deleted the .htaccess file. Great, fixed. Now I'm getting an error that says $databaseConfig isn't defined. Which it is, in the _config.php file.

I'm not entirely sure how to proceed. Has anyone else gotten this error in a similar context? Does anyone know the best way to fix this?


Community Member, 419 Posts

24 August 2015 at 10:55pm

Edited: 24/08/2015 10:57pm

You didn't copy all the files, or need a better grasp of server setup. You should keep the .htaccess (or set up similar in vhost), but modify the RewriteBase to match your new setup. Relying on index.php is not ideal.
I'm pretty sure the database config needs to be in the $project dir - ensure that you have this set correctly. It should be if it's a direct copy.
Check to make sure it's not configuring from env, which would require you to also fetch or create a _ss_environment.php (which may not be in the install dir) - see for detail.