Skip to content

TokGrab Upgrade Guide

Before You Start

Always back up:

  1. Database (export a dump).
  2. .env file — contains your app key and settings wiring.
  3. Uploaded files under storage/app/.
  4. storage/app/installed.lock — keep this so the installer stays locked.

⚠️ Never replace your existing .env with the package's .env.example. If .env is lost, generate a new key and reset your credentials.


Safe Upgrade Flow

  1. Back up the database and .env (above).
  2. Download the new package and check its CHANGELOG.md.
  3. Upload the new files over your existing installation, but do not overwrite:
  4. .env
  5. storage/app/ (uploads and the install lock)
  6. If any new database tables are required, run migrations (see below).
  7. Clear caches (see below).
  8. Re-test the site and admin.

If the package was built with the release packager

The packaged ZIP already excludes .env, local databases, and logs, so uploading it over your site is safe for those files.


Running Migrations

With SSH/terminal:

php artisan migrate --force
php artisan optimize:clear

Without SSH (shared hosting): Some hosts expose a terminal in the panel — use it if available. If not, and the upgrade includes schema changes, you may need help: temporarily move storage/app/installed.lock aside, run the installer's migration step, then restore the lock. Back up first, and note this requires re-confirming database settings.


Clearing Caches

Run these if you have terminal access:

php artisan optimize:clear
php artisan config:clear
php artisan view:clear

On shared hosting without a terminal, deleting the contents of bootstrap/cache/ and storage/framework/views/ achieves a similar reset.


After Upgrade — Validation Checklist

  • [ ] Homepage loads
  • [ ] Search works with a real profile
  • [ ] Profile and video pages load
  • [ ] Admin login works
  • [ ] Admin settings save correctly
  • [ ] API test connection passes
  • [ ] Ads and branding still render

Rollback

If something breaks:

  1. Restore the previous package files.
  2. Restore the database backup (if migrations changed the schema).
  3. Restore .env and storage/app/.
  4. Clear caches and re-test.