Reinstalling.
How to reinstall the application while preserving data.
Sometimes you need to reinstall Reward Loyalty—for database changes, fresh starts, or troubleshooting. This guide covers both scenarios.
Prefer Updates: For normal updates, use the Updating feature instead of reinstalling. It's safer and preserves all your data automatically.
Fresh Installation (Reset Everything)
To start completely fresh and remove all data:
- Open your
.envfile - Find this line:
APP_IS_INSTALLED=true - Change it to:
APP_IS_INSTALLED=false - Save the file
- 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) |
| User Uploads | public/files/ |
Images, QR codes, and uploaded media |
| Custom Translations | lang/<your_locale>/ |
Any translations you've modified |
MySQL/PostgreSQL Users: Your database is stored externally, so you only need to preserve the
.envfile (which contains your connection settings).
Step 2: Delete Application Files
Delete all files and folders except the ones you backed up.
Step 3: Upload Fresh Files
Upload the latest version of Reward Loyalty from the current purchase store (see /buy).
Step 4: Restore Your Files
Copy your preserved files back to their original locations:
.env→ root directorydatabase.sqlite→database/folderpublic/files/contents →public/files/- Custom translations →
lang/folder
Step 5: Run Migrations
Run any pending database migrations:
php artisan migrate
Or log in as admin—if updates are needed, you'll be prompted to run them.
Step 6: Clear Caches
php artisan config:clear
php artisan cache:clear
php artisan view:clear
When to Reinstall
Fresh Install (Delete Everything)
Use when:
- Starting over from scratch
- Testing the installation process
- Creating a new demo environment
- Switching databases completely
Preserve Data Reinstall
Use when:
- Manually updating core files
- 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 your original .env file. If you don't have it, you'll need to do a fresh installation (existing encrypted data will be unrecoverable).
"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
Related Topics
- Updating — One-click updates (preferred method)
- Manual Update — Step-by-step manual update process
- Installation — First-time installation guide