Skip to content

Reinstalling.

How to reinstall the application while preserving data.

Oct 2, 2026
On this page

Use this guide when you need to replace damaged application files or start over on a test installation. For a normal release update, follow Updating.

Prefer Updates: For normal updates, use the Updating feature instead of reinstalling. It's safer and preserves all your data for you.


Fresh installation (reset everything)

To start fresh and remove all data:

  1. Open your .env file
  2. Find this line:
    APP_IS_INSTALLED=true
    
  3. Change it to:
    APP_IS_INSTALLED=false
    
  4. Save the file
  5. Visit your domain

The installation wizard will appear. Completing it will replace all previous data.

⚠️ Warning: A fresh installation deletes all existing data including members, partners, cards, rewards, and transactions. Make sure you have backups if needed.


Reinstall while preserving data

To reinstall the application code while keeping your existing data intact:

Step 1: Back up critical files

Before doing anything, preserve these items:

Item Location Contains
Environment .env All settings, database credentials, encryption key
SQLite Database database/database.sqlite All your data (if using SQLite)
Private files storage/app/ Private uploads and integration credentials
User Uploads public/files/ Images, QR codes, and uploaded media
Custom translation files lang/<your_locale>/ Translation files you changed by hand. Translations edited on the Languages screen live in the database.

MySQL/MariaDB: Export the database as well as saving .env. Connection settings are not a backup of your member and transaction data.

Step 2: Delete application files

Restrict public access through your host or web server and stop any configured background jobs before replacing files. After writes stop, take a final database backup and copy of public/files/ and storage/app/. Use these final copies in the restore step. Keep the backup outside the public web directory. Move the old application files there until the replacement passes your checks.

Step 3: Upload fresh files

Upload the latest version of Reward Loyalty from the current licensed-download storefront.

Step 4: Restore your files

Copy your preserved files back to their original locations:

  • .env → root directory
  • database.sqlite → database/ folder
  • public/files/ contents → public/files/
  • storage/app/ contents → storage/app/
  • Custom translations → lang/ folder

Step 5: Run migrations

Sign in as admin. If the database needs an update, follow the prompt to apply it. With terminal access, you can use php artisan migrate instead.

Step 6: Clear caches

Use the cache-clearing steps for your hosting file manager. If you have terminal access, you can use:

php artisan config:clear
php artisan cache:clear
php artisan view:clear

Check sign-in, member data, and uploads. Resume any jobs you paused and restore public access only after these checks pass.

When to reinstall

Fresh install (delete everything)

Use when:

  • Starting over from scratch
  • Testing the installation process
  • Creating a new demo environment

Preserve data reinstall

Use when:

  • Updating core files by hand
  • Troubleshooting file corruption
  • Applying hotfixes
  • Recovering from a failed update

Common issues

"The encryption key is missing"

This happens when your .env file is missing or the APP_KEY is empty.

Solution: Restore the original APP_KEY from your .env backup or hosting secrets. Keep the database intact while you recover the key. A new key cannot read values encrypted with the old one. If no backup exists, ask support which credentials need to be entered again; do not reset the database as a troubleshooting step.

"Database connection refused"

Your database settings in .env are incorrect.

Solution: Verify DB_HOST, DB_DATABASE, DB_USERNAME, and DB_PASSWORD are correct.

"Page shows error after reinstall"

Cached files may be causing issues.

Solution: Clear all caches:

php artisan config:clear
php artisan cache:clear
php artisan view:clear
php artisan route:clear