I need to set up a local environment for a non WordPress site. I’m having trouble connecting to the database. How do I update the path’s listed in the database tab of Local’s control panel? See screenshot below:
*** update ***
I’ve tried mapping my config file to the master config. Normally this is not such a big deal, but I can’t seem to get the right number of directories up. What is the DOCUMENT_ROOT of a Flywheel Local site? (see screenshot below)
*** update ***
Is the “Site Path” considered the root directory?
I"m thinking that it its. which would mean $_SERVER[‘DOCUMENT_ROOT’] is the same as the “Site Path” in the Local GUI Site Setup interface. Is this correct?
I’m sure this comes down to a simple mapping issue. I need to include a require directive and I just can’t seem to get the mapping correct.
*** update ***
I’ve determined that $_SERVER[‘DOCUMENT_ROOT’] is /app/public
I’ve successfully tested including a file that is in any folder within app, but if I try and include a file above the root then the directive fails.
include (DIR ) . ‘/…/…/…/…/…/config.master.php’;
I’m guessing that the FlyWheel Local app has some restrictions in place that are preventing me from accessing above the root files. I’m really hoping that one of the developers will jump in and enlighten me
Appreciate the help!
logs are shared into the site container. So, the best thing to do would be to move
config inside of
app if possible.
If that’s not possible, then you can use this add-on to map the config directory into the Local site’s container: https://github.com/getflywheel/local-addon-volumes
Thank you very much. I’ve downloaded and installed the local addon volumes. I’m a little out of my depth here in understanding what host source and container destination to add.
I’m pretty sure that the Host Source is the folder I’m trying to map to.
What do I add as the container destination? What is a container destination?
When I tried to “Remap Volumes” I got an error “Invalid Paths Provided” so I removed the entry I was attempting to make and clicked on the “Remap Volumes” button again. I got the same error with no values changed. Below is a screenshot.
Appreciate you taking the time to educate me.
Aha, there may be an issue with that add-on on Windows. We’ll look into that!
One thing you can do in the meantime is to move the
config directory containing
config.dev.php into the
app directory of the Local site. Then, you should be able to include the file without a problem.
Thanks for the response. I do understand what you are saying about moving the config file within the app directory. It’s a backup plan, but not the goal.
There is a config file within the site, but it maps to a master config that handles multiple environments, (production, staging, dev, local) not just the local one. Moving the master config defeats the purpose of the multi environment config setup.
I realize I’m pushing at the edges—can’t blame a girl for that!