Updating WhatsMax
There are two ways to update: the one-click updater in the admin panel, or a manual CLI update. Both need a valid, activated license.
Back up first — every time
Before any update, back up the database and your .env:
mysqldump -u whatsmax -p whatsmax | gzip > ~/backup-whatsmax-$(date +%F).sql.gz
cp /var/www/whatsmax/.env ~/backup-env-$(date +%F)
If you use local storage, also back up public/storage (uploaded media).
Option A — one-click updater (recommended)
- Go to Admin → System → License.
- If a new version is available, an Update available card appears with the changelog.
- Click Apply update. The updater downloads the release, replaces the application files, and runs the necessary migration steps.
- When it finishes, rebuild and restart from the CLI:
cd /var/www/whatsmax
npm install # in case dependencies changed
npm run db:deploy # apply any new database migrations
npm run build
pm2 restart ecosystem.config.cjs
Option B — manual CLI update
- Download the latest ZIP from your purchase downloads page.
- Extract it over the existing installation — your
.envis not part of the ZIP and stays untouched:
cd /var/www
unzip -o whatsmax-vX.Y.Z.zip -d whatsmax
- Rebuild and restart:
cd /var/www/whatsmax
npm install
npm run db:generate
npm run db:deploy
npm run build
pm2 restart ecosystem.config.cjs
Verify after updating
- The version shown in Admin → System → License matches the release you applied.
- Admin → System → Queue and Cron show healthy workers/heartbeats.
- Log in to a workspace, open the inbox, send a test message.
Rollback
If something breaks:
# restore code: re-extract the previous version ZIP, then
npm install && npm run build && pm2 restart ecosystem.config.cjs
# restore database if migrations were applied:
gunzip < ~/backup-whatsmax-YYYY-MM-DD.sql.gz | mysql -u whatsmax -p whatsmax
Staging first
Keep a staging clone (same server, different port and database) and apply every update there before production.