Roots Discourse

Intended method for updating WordPress Core on staging/production sites?

I’m using trellis. I have a small, simple production site that doesn’t have a staging counterpart (if that’s even relevant to this question). After having tested a WordPress Core update in my dev environment, which of the following four ways is the preferred method for updating WordPress in production?

  1. SSH in and run wp core update?
  2. SSH in and edit composer.json and run composer update?
  3. Run a deploy again?
  4. Set DISALLOW_FILE_MODS to false and update from WordPress dashboard?

I assume any of the methods would work (in fact I know methods #3 and #4 work, because that’s how I’ve done it in the past). But which is the “right” method?

The right method is the same method of updating any dependency:

  • update it locally (dev) via Composer and commit the updated composer files
  • deploy
3 Likes

Excellent. Thanks! I suspected that was the right method. It always just feels like doing a lot where a little would do. I mean it’s a single command either way, but that command (looks like it) causes a lot to happen.

Thanks again!

1 Like

I’m trying the same method, but it’s not updating.

maybe because of web/wp is written in .gitignore of bedrock version.

Should I remove this web/wp line? would it be the right way to do it?