Best Practices for Using Same SuiteCRM 8 Codebase on Multiple Domains

I am using the same SuiteCRM 8 folder/codebase to create multiple CRM instances on different domains.
For each instance, I currently make the following changes:

  • Update database name in .env.local

  • Update database name and site URL in config.php

Apart from these, I would like to know:

  1. What other configurations should be changed when using the same CRM code on multiple domains?

  2. Are there any environment-specific files or settings (cache, logs, sessions, permissions, etc.) that should be separated?

  3. Is this approach recommended for production, or should each domain have a separate codebase?

  4. Any best practices to avoid issues related to caching, security, upgrades, or performance?

Looking forward to guidance from the community.
Thank you in advance.

1 Like

Are you using source control? For example, git?

Yes we are using GIT

I can’t advise on some of the issues you raised, I am not sure of the details; but regarding the codebase I guess a git setup will be helpful.

That way you can have versioning, keep all files safely, and it’s not too hard to spread your custom changes from one server to the other by cherry-picking commits.

This also has its complexities; how to handle upgrades, how to handle changes made via the UI (some companies prefer to disable Studio and Module Builder for their clients, so that all changes are generated via code and commited properly.

You need a careful setup of your .gitignore; and I never get this right at first, it’s always trial-and-error.

I know this is not very detailed or complete, but I hope it helps, and maybe someone else has more tips?

1 Like

Its difficult is the simple answer :wink:

I would recommend:

public/legacy/Config.php

public/legacy/config_override.php

(DB credentials, API and APP secrets are in there, log file location is in there and legacy file upload location).

You would want to override the log file location in the yaml files as well for the suite8 logs.

Also if using the V8 api you would want to have unqiue public/private keys for each one as well (public/legacy/Api/V8/Oauth2/)

Then there are the two cache locations (public/legacy/cache and /cache)

im not even sure if all of these can be overridden (check config files) the Suite8 versions are likely to be overridable (via yaml)

Regards

Mark