Auto-Updates
Let Pubvana update itself and its extensions automatically every day.
TL;DR
Go to Admin → Updates → Settings: enable Auto-Update, set Check Method to Cron Job, and add the crontab line. Pubvana will check for updates daily and apply them automatically if no breaking changes are detected. Toggle auto-update per extension on the Addons tab.
Details
The Daily Update Chain
When the pubvana-update-chain task fires (once per 24 hours, cache-gated), UpdateService::checkAndAutoUpdateIfDue() runs the following sequence:
- CMS update check — fetches
CHANGES.jsonfrom GitHub and compares the latest version against the installedAPP_VERSION. - Safety gate — if the changelog contains breaking changes for the new version, auto-update is skipped and an admin notification is shown instead. Manual review is required.
- Pre-update backup — a full site backup (
files + DB dump) is created inwritable/backups/before any files are touched. - Download and extract — the release zip is downloaded from GitHub and extracted to
writable/updates/. - Apply files — updated files are copied over the existing installation. Config files (
.env,App.php,Database.php) are preserved. - Run migrations —
php spark migrateis run to apply any new database migrations. - Clear cache — all caches are flushed.
- Extension update check — all installed themes, widgets, and plugins are checked for updates via their
update_urlendpoints. - Extension auto-update — extensions with
auto_update = 1are updated automatically, subject to compatibility checks.
Safety Features
- Breaking changes detection: if
CHANGES.jsonflags a version as containing breaking changes, auto-update is skipped entirely. You will see a notification in the admin dashboard. - Localhost/dev bypass: auto-updates are skipped on localhost and known development domains. Updates are applied only in production environments.
- Backup before every update: a timestamped backup is always created before any CMS update, giving you a restore point if something goes wrong.
- Extension compatibility: each extension declares
min_pubvana_versionandmax_pubvana_version. Extensions outside these bounds are skipped during auto-update. - 24-hour cache gate: even if
cron minuteruns every minute, the update chain only executes once per day.
Manual Updates
If auto-update is disabled, Pubvana still runs the daily check and displays a notification badge in the admin header when a new version is available. You can then apply the update manually from Admin → Updates with a single click.
Checking Extension Auto-Update Status
Visit Admin → Updates → Addons. Each installed theme, widget, and plugin is listed with its current version, latest available version, and an auto-update toggle. Flip the toggle to enable or disable automatic updates per extension.