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?
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 https://docs.silverstripe.org/en/3.1/getting_started/environment_management/ for detail.