2

Should Project Config ('useProjectConfigFile' => true,) be set to 'true' or 'false' on the Production server? I have been reading Craft CMS documentation, watching some CraftQuest Lessons, searching here on Stack Exchange, but have not found a suggested best practice.

I performed a Craft CMS update via the Control Panel Update button with Project Config on. The Update crashed.

1 Answer 1

2

Even if useProjectConfig was set to false, it's not a good idea to update Craft on a live site because, as you've discovered, errors sometimes happen.

There's even an allowUpdates config setting that we recommend people setting to false on the live site just so someone doesn't accidentally update Craft from the control panel.

The safer workflow is to have a dev/staging/test environment where you can perform the update first, verify that everything still works fine and then you can deploy the update files to the live site with a much smaller chance of something going wrong.

If you've decided to use Project Config, which it seems you have, then you should really not be doing updates on the live site from the control panel.

And you should also have allowAdminChanges set to false so no one can even make Craft settings changes from the control panel.

At that point, Project Config should be enabled in all of your environments and your config/project.yaml and composer.json and composer.lock files should be deployed to your live site along with a deployment process that runs composer install on the live site post-deployment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.