Manually update v5 zip file


When I update IN v5 via the zip file, I have to run the route /update?secret=
What exactly does this do? I suppose that it checks if there are database scheme updates, migrate, etc?

I would like to automate that, without the need to run or surf to /update?secret=
What commands do I have to run?

Thank you


@david any thoughts?


There is a regular system task inside the app that can perform the same task as running /update manually - however you would need to wait for a few minutes for the task to run after a new zip file has been unpacked. To cover all use cases, we suggest the user runs /update as part of their upgrade process to ensure all tasks are definitely completed.

The /update route deletes the caches bootstrap folder, runs any migrations pending, rebuilds the routes file, clears the config:cache, and also rebuilds the static cache (countries / languages / gateways) etc etc.

  1. How does that system task knows that a new zip file is unpacked? When does it run?
  2. So I’m fine to just unpack the zip folder and wait a few minutes for that system task to run? Is there a check I can do to find out if the system task has run well?
  3. Why is there a “secret” for the /update route? Is it resource intensive so that not everyone would be able to run it?
  4. Is it necessary to run composer install again after an update?

Thank you

When you unpack the files the cached version will mismatch from the new VERSION.txt file - so the app will execute the update routines.

The update secret is there for users who want an additional layer of security - we consider it a protected route so would recommend a secret be set.

Thanks for the clarification, David!

Some more composer questions:

  1. Is it necessary to run composer install again after an update?
  2. Do we have to run composer update regularly to update the packages?

It depends which package you download.

If you download the package - this comes pre-built with all the vendor dependencies, so no composer commands are required.

If you use the smaller package - this only contains the source code changes - and not the latest vendor dependencies.

You should never run composer update we package the composer.lock file so the only command that can/should be run is composer install --no-dev -o