31

How can I prevent my client from auto-updating Craft in production? I don't want them to run Craft updates on the production site, but the "updates" badge seems irresistible to them. I would prefer to run Craft updates in my dev environment, version control with Git, test, and then deploy at my leisure.

1
  • 6
    My guess is that Craft's update badge was specifically engineered for irresistableness. I'm not even on the client side, and I still have to remind myself to play it cool. Commented Jun 12, 2014 at 4:19

2 Answers 2

47

You can use the config/general.php file to specify whether auto-updating is allowed:

Craft 2

'allowAutoUpdates' => false 

https://docs.craftcms.com/v2/config-settings.html#allowAutoUpdates

Craft 3

'allowUpdates' => false 

https://docs.craftcms.com/api/v3/craft-config-generalconfig.html#property-allowupdates

Combined with a multi-environment configuration, this can be very helpful.

Admittedly, this doesn't prevent the "Updates are available" notification from appearing... There have been some discussions about future versions of Craft possibly adding a separate config setting which will allow you to disable that notification as well.

4
  • 6
    Stop making your answer better than mine! Commented Jun 12, 2014 at 2:15
  • 4
    Lol... You may be overqualified to handle a question like this... Save your rep for those really complicated ones. ;) Commented Jun 12, 2014 at 2:17
  • 5
    Perfect. If I want to hide the updates badge completely I'll just use your excellent CP CSS Plugin, Lindsey ;) Commented Jun 12, 2014 at 2:34
  • Hadn't even thought of that! Great idea Alex! Commented Jun 12, 2014 at 4:42
9

There is an "allowAutoUpdates" config setting that you can set to false, which will disable auto-updating for a Craft install. Manual updating will still work, though.

1
  • 3
    It would be nice to see this option available to check off in the user/user group control panel. You could disallow it for everyone, including Site Admins, then go back to each individual user and allow them to run updates. This way you can allow clients the peace of mind of having a super admin account (which they could still go and undo what you just did above) while making it difficult for them to run updates and possible mess something up. Commented Jun 12, 2014 at 17:09

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.