Forum

Thread tagged as: Question, Installation, Configuration

Setting up Perch with a custom config

Is it possible to setup a site when I already have the config file built? In short, because we setup a couple Perch sites a month, we have a config that works for us along with a separate config (required in the main config) that contains the secrets (such as db password) and is not included in the repo (so it can easily be different on local/dev/staging/production/etc).

If I run the setup process, (1) doesn't load the existing config (thus ignore the db settings or perch licence pages) and (2) overwrites the existing files.

Is there a way to just run the DB and user creation portions of the setup?

It seems that I could run the code in setup/sql/perch.sql (but would need to replace __PREFIX__ and __PERCH_VERSION__ so that seems ugly) but this wouldn't setup the user (and thus password hashing).

Thanks

Darryl Hein

Darryl Hein 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Why run setup? I would have a template blank install and cone that and go from there.

What about the DB and user account password (ie hashing)? You're likely changing the SQL structure to some degree so I'd need to make sure it's up to date with every release (ugly and manual likely leading confusion/errors). I'd also need to figure out how you've done password hashing plus permissions, etc to create the Perch user.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Create a master account in your template install that you can modify as needed.

If you update your template install with a new core folder, Perch will take care of updating the database.