Upgrade Guide
How to safely update Deprixa Plus from any previous version to the latest release without losing your data, settings, shipments, or configurations.
ALWAYS Back Up Before Upgrading
Before starting any upgrade, always create a full backup of your database and files. While the upgrade process is designed to be safe and non-destructive, having a backup ensures you can recover in case of unexpected issues (server crash during migration, disk full, etc.).
Table of Contents
- How Updates Work — What Changes and What Doesn't
- Your Data Is Safe — Detailed Guarantee
- Before You Start — Pre-Upgrade Checklist
- Method 1: Automatic Update (Recommended)
- Method 2: Manual Update via SSH
- Method 3: Artisan Upgrade Command
- What's New in v1.4.0 — Complete Change Summary
- Database Changes — Tables, Permissions, and Seeders
- Post-Upgrade Verification
- Rollback — How to Revert If Something Goes Wrong
- Version Upgrade Path — From Any Version
- Frequently Asked Questions
1. How Updates Work — What Changes and What Doesn't
Understanding what the upgrade process does is the key to feeling confident about it. Here's the complete picture:
What DOES Change (Code & Structure)
| Component | What Happens | Your Data Affected? |
|---|---|---|
| PHP source code | All app/, routes/, config/ files are replaced with the new version | No — your data is in the database, not in PHP files |
| JavaScript / CSS | All resources/js/ and compiled public/build/ files are replaced | No — UI code doesn't store data |
| Database schema | New tables are CREATED (never dropped). New columns are ADDED to existing tables (never removed) | No — existing data is untouched |
| Permissions | New permissions are ADDED. Existing permissions remain unchanged | No — your custom role assignments are preserved |
| SaaS Plans | Default plans are created if they don't exist. Existing plans are NOT overwritten | No — if you already customized plans, they stay as-is |
What Does NOT Change (Your Data)
| Your Data | Status | Explanation |
|---|---|---|
| Shipments | 100% Safe | The shipments table is never touched by migrations. All your tracking numbers, statuses, and history remain exactly as they are. |
| Clients / Customers | 100% Safe | The customers table is never modified. Names, addresses, phone numbers — all preserved. |
| Invoices | 100% Safe | All invoices, payments, and billing history remain in the invoices table unchanged. |
| Users & Passwords | 100% Safe | User accounts, hashed passwords, and profile data are never touched. Users can log in normally after the upgrade. |
| Settings / Configuration | 100% Safe | The settings table stores your company profile, branding, SMTP config, API keys, etc. This table is NEVER modified by migrations. |
| Branches | 100% Safe | All branch data (names, addresses, codes) remains unchanged. |
| Notification Channels | 100% Safe | Your SMTP, Twilio, UltraMsg configurations in notification_channels are preserved. New channels are only added if they don't exist yet. |
| Uploaded Files | 100% Safe | Logos, labels, attachments in storage/app/ are never deleted during upgrade. |
| .env File | 100% Safe | Your environment configuration (database credentials, APP_KEY, mail settings) is never overwritten. |
| Custom Roles | 100% Safe | If you created custom roles, they remain. The seeder only updates the 5 default roles (super-admin, admin, employee, driver, customer). |
2. Your Data Is Safe — Technical Explanation
Here's why your data is safe, from a technical perspective:
Every migration in Deprixa Plus uses Schema::hasTable() checks before creating tables. If the table already exists, the migration is skipped entirely. There are zero DROP TABLE or TRUNCATE statements in any migration. New columns are added with Schema::table()->addColumn() — never by dropping and recreating.
The RolesAndPermissionsSeeder uses Permission::firstOrCreate() — if a permission already exists, it's not duplicated. If you've modified a default role's permissions, your changes are preserved because the seeder only adds new permissions, it doesn't remove existing ones from roles.
Laravel tracks which migrations have already run in the migrations table. If you upgrade from v1.3.1 to v1.4.0, only the migrations that haven't run yet will execute. Migrations from v1.3.1 won't run again — Laravel knows they already completed.
Your company profile, branding colors, SMTP configuration, API keys — all stored in the settings table — are never touched by any migration or seeder. These are your custom data, and the upgrade process has no reason to modify them.
Think of it like a mobile app update
When you update WhatsApp on your phone, your chats don't disappear. The same principle applies here — the code (application logic, UI) is updated, but your data (stored in the database) remains exactly where it is.
3. Before You Start — Pre-Upgrade Checklist
Step 1: Create a Full Backup
This is the most important step. Create a backup of both your database and files.
Database Backup (via command line):
# Replace with your actual database credentials
mysqldump -u your_db_user -p your_database_name > backup_v1.3.1_$(date +%Y%m%d_%H%M%S).sql
# Verify the backup file was created and has content
ls -lh backup_v1.3.1_*.sql
Database Backup (via phpMyAdmin):
- Open phpMyAdmin in your browser
- Select your Deprixa Plus database
- Click "Export" tab
- Select format: SQL
- Click "Go" to download the .sql file
- Save this file in a safe location outside your server
Files Backup:
# Backup the entire application directory
cp -r /var/www/deprixa-plus /var/www/deprixa-plus-backup-v1.3.1
# Or create a compressed archive
tar -czf deprixa-plus-backup-v1.3.1.tar.gz /var/www/deprixa-plus
Critical Files to Preserve
Make sure your backup includes: .env (environment config), storage/app/ (uploaded files, logos, labels), and the database dump. These three contain all your custom data.
Step 2: Check System Requirements
Verify your server meets the requirements for the new version:
| Component | Required | Check Command |
|---|---|---|
| PHP | 8.2+ | php -v |
| MySQL | 8.0+ (or MariaDB 10.6+) | mysql --version |
| Composer | 2.6+ | composer --version |
| Node.js | 20+ LTS | node -v |
| Disk Space | At least 500 MB free | df -h |
Step 3: Note Your Current Version
# Check your current version
php artisan about | grep -i version
# Or check in the browser at:
# Settings → Updates → Current Version
Step 4: Inform Your Team
If other people use the system, let them know you're about to upgrade. The system will be in maintenance mode for 2-5 minutes during the upgrade. Active sessions will not be lost, but users won't be able to access the app during that window.
4. Method 1: Automatic Update (Recommended)
The easiest way to upgrade. Done entirely from the browser — no SSH or command line needed.
Step-by-Step:
-
Log in as Super Admin
Only Super Admin users can access the update module. Navigate toSettings → Updates. -
Activate Your License (if not already done)
Enter your Envato Purchase Code and your name as registered on CodeCanyon. Click "Activate License". The system validates your purchase code against the license server. -
Check for Updates
Click the "Check for Updates" button. If a new version is available, you'll see a banner with:- Current version vs. new version number
- Download size
- Summary of changes from the changelog
-
Click "Apply Update"
The system automatically:- Downloads the update package from the update server
- Enables maintenance mode (users see a "Maintenance" page)
- Replaces application files (PHP, JS, CSS)
- Runs database migrations (creates new tables, adds new columns)
- Syncs permissions and SaaS plans via seeders
- Clears all caches
- Disables maintenance mode
-
Verify
The progress terminal shows each step in real time. When complete, the current version badge updates to the new version. Navigate around the app to confirm everything works.
The automatic update pre-compiles JS/CSS
The update package includes pre-compiled public/build/ files. You do NOT need to run npm install or npm run build when using the automatic update method.
5. Method 2: Manual Update via SSH
For users who prefer full control, or if the automatic update fails due to server restrictions (some shared hosts block exec() or proc_open()).
Step 1: Download the New Version
Download the latest version from CodeCanyon (your Envato Downloads page). You'll receive a ZIP file like deprixa-plus-v1.4.0.zip.
Step 2: Enable Maintenance Mode
cd /var/www/deprixa-plus
php artisan down --secret="upgrade-secret-token"
# You can still access the app via:
# https://yourdomain.com/upgrade-secret-token
Step 3: Replace Application Files
DO NOT Replace These Files/Folders
When extracting the ZIP, do NOT overwrite: .env, storage/app/, storage/logs/, storage/framework/sessions/. These contain your data and configuration.
Replace these directories with the new version:
# Extract the new version to a temporary directory
unzip deprixa-plus-v1.4.0.zip -d /tmp/deprixa-new
# Replace application code (preserving .env and storage)
rsync -av --exclude='.env' \
--exclude='storage/app/' \
--exclude='storage/logs/' \
--exclude='storage/framework/sessions/' \
--exclude='storage/framework/cache/' \
/tmp/deprixa-new/ /var/www/deprixa-plus/
# Alternative: Replace folder by folder
cp -r /tmp/deprixa-new/app/ /var/www/deprixa-plus/app/
cp -r /tmp/deprixa-new/config/ /var/www/deprixa-plus/config/
cp -r /tmp/deprixa-new/database/ /var/www/deprixa-plus/database/
cp -r /tmp/deprixa-new/public/ /var/www/deprixa-plus/public/
cp -r /tmp/deprixa-new/resources/ /var/www/deprixa-plus/resources/
cp -r /tmp/deprixa-new/routes/ /var/www/deprixa-plus/routes/
cp /tmp/deprixa-new/composer.json /var/www/deprixa-plus/composer.json
cp /tmp/deprixa-new/composer.lock /var/www/deprixa-plus/composer.lock
Step 4: Install Dependencies
cd /var/www/deprixa-plus
# Install PHP dependencies
composer install --no-dev --optimize-autoloader
# If JS is NOT pre-compiled in public/build/, also run:
# npm install && npm run build
Step 5: Run Database Migrations
# Run pending migrations (creates new tables, adds columns)
php artisan migrate --force
# This is SAFE — it only runs migrations that haven't run yet
# Your existing data is NOT affected
Step 6: Sync Permissions and SaaS Plans
# Add new permissions to the system (does NOT remove existing ones)
php artisan db:seed --class=RolesAndPermissionsSeeder --force
# Add new SaaS plans (does NOT overwrite existing plans)
php artisan db:seed --class=SaasPlansSeeder --force
Step 7: Clear Caches and Optimize
# Clear all caches
php artisan optimize:clear
# Rebuild optimized cache
php artisan optimize
# Clear compiled views
php artisan view:clear
Step 8: Set Permissions and Go Live
# Fix file permissions (Linux)
chown -R www-data:www-data /var/www/deprixa-plus
chmod -R 755 /var/www/deprixa-plus/storage
chmod -R 755 /var/www/deprixa-plus/bootstrap/cache
# Disable maintenance mode
php artisan up
6. Method 3: Artisan Upgrade Command
Deprixa Plus includes a built-in upgrade command that automates steps 5-8 of the manual process. Use this after you've already replaced the files (steps 1-4).
# Run the complete upgrade sequence
php artisan deprixa:upgrade
This single command performs 6 automated steps:
| Step | Action | What It Does |
|---|---|---|
| 1 | Maintenance Mode ON | Puts the app in maintenance mode with a secret token so you can still access it |
| 2 | Run Migrations | Executes php artisan migrate --force — creates new tables, adds new columns |
| 3 | Sync Permissions | Runs RolesAndPermissionsSeeder — adds new permissions (102 total), updates default role assignments |
| 4 | Sync SaaS Plans | Runs SaasPlansSeeder — adds default SaaS plans (5 total) if they don't exist |
| 5 | Clear & Rebuild Cache | Runs optimize:clear + optimize — clears stale config, route, and view caches |
| 6 | Maintenance Mode OFF | Brings the app back online |
After completion, the command outputs a summary table:
+------------------+---------------------+
| Component | Status |
+------------------+---------------------+
| Migrations | Applied |
| Permissions | 102 synced |
| SaaS Plans | 5 synced |
| Cache | Cleared + rebuilt |
| Maintenance | Disabled |
+------------------+---------------------+
Upgrade complete!
Force Mode
If the command asks for confirmation, use the --force flag: php artisan deprixa:upgrade --force. This is required when running in production environments.
7. What's New in v1.4.0 — Complete Change Summary
If you're upgrading from v1.3.x, here's everything that changed:
New Modules
Complete multi-tenant subscription system with 5 plans (Free, Starter, Growth, Pro, Enterprise), wallet-based billing, auto-renewal, grace periods, and read-only enforcement. Subscription lifecycle: trial → active → grace_period → read_only → suspended.
Create, edit, sign, and manage customer contracts. Attach files, link to rate cards, track expiration dates. Full CRUD with status workflow (draft → active → expired → cancelled).
Configure commission rules (percentage or fixed) per user, branch, or zone. Automatic commission calculation on shipment creation. Approval and payment workflow for commission payouts.
New Payment Gateways
Accept payments via cards, bank transfers, USSD, and mobile money. Full webhook integration with HMAC SHA-512 verification. Popular in Africa (Nigeria, Ghana, South Africa, Kenya).
Enhanced webhook signature verification, test mode support, and integration with the SaaS wallet recharge system.
New Notification Channel
Alternative to Twilio for WhatsApp notifications. Simple HTTP API, cheaper than Twilio. System prioritizes UltraMsg first, falls back to Twilio if UltraMsg fails. Notifications dispatched as background jobs with retry logic.
Permissions & Security
5 new SaaS permissions added: saas.billing.admin, saas.plans.manage, saas.subscriptions.manage, saas.wallets.manage, saas.invoices.manage. Plus new permissions for contracts and commissions modules.
All payment gateway credentials (Stripe, PayPal, Paystack) and notification channel tokens (Twilio, UltraMsg) are now encrypted using Laravel's Crypt::encryptString() before storing in the database.
Bug Fixes & Improvements
Fixed all tables and forms for 1024x768 square monitors. Horizontal scroll on data tables, auto-collapsible sidebar, adaptive grid layouts on all 16+ pages.
All hardcoded strings replaced with translation keys. Multi-language support via i18n JSON files. Currently includes English and Spanish.
Parent menu items with children now expand/collapse properly. Collapsed mode shows hover popovers rendered via React Portal to prevent clipping issues.
All dates now use the configured locale format via fmtDate() helper instead of raw ISO strings.
8. Database Changes — v1.3.x to v1.4.0
The database went from 79 tables to 80 tables. Here is exactly what was added:
New Tables Created
| Table Name | Purpose | Records Seeded |
|---|---|---|
contracts | Customer contracts with rate cards, terms, signatures | 0 (empty) |
commission_rules | Commission configuration per organization | 0 (empty) |
commissions | Individual commission transactions linked to shipments | 0 (empty) |
saas_plans | Subscription plan definitions with limits | 5 default plans |
saas_subscriptions | Organization subscription records with status lifecycle | 0 (empty) |
saas_wallets | Organization wallet balance | 0 (empty) |
saas_wallet_transactions | Wallet credit/debit ledger | 0 (empty) |
saas_invoices | SaaS billing invoices | 0 (empty) |
notifications | Laravel DatabaseNotifications (UUID primary key) | 0 (empty) |
personal_access_tokens | Extended Sanctum API tokens with org scoping | 0 (empty) |
integrations | Third-party service configurations | 0 (empty) |
Important: All new tables are created with Schema::hasTable() checks — if the table already exists (e.g., from a partial previous upgrade), it is skipped safely.
Permissions Changes
| Category | New Permissions |
|---|---|
| SaaS (5 new) | saas.billing.admin, saas.plans.manage, saas.subscriptions.manage, saas.wallets.manage, saas.invoices.manage |
| Contracts (3 new) | contracts.view, contracts.create, contracts.manage |
| Commissions (2 new) | commissions.view, commissions.manage |
These permissions are automatically added to the super-admin and admin roles by the seeder. Your custom roles will need to be manually updated if you want them to access the new modules.
Tables NOT Modified
The following tables are never touched during the upgrade — your data remains exactly as-is:
shipments, customers, invoices, invoice_items, users, settings, branches, services, rates, rate_zones, shipment_statuses, notification_channels, notification_rules, notification_logs, activity_log, organizations, and all other existing tables.
9. Post-Upgrade Verification Checklist
After upgrading, verify these items to confirm everything works correctly:
| # | Check | How to Verify |
|---|---|---|
| 1 | Login works | Log in with your admin account. Verify the dashboard loads correctly. |
| 2 | Version number updated | Go to Settings → Updates. The current version should show the new version. |
| 3 | Existing shipments visible | Navigate to Shipments. Verify your existing shipments are listed with correct data. |
| 4 | Settings preserved | Go to Settings → Company. Verify your company name, logo, and contact info are unchanged. |
| 5 | Branding intact | Check your logo in the sidebar, primary color, and login page appearance. |
| 6 | SMTP works | Go to Settings → Notifications. Send a test email to verify SMTP is still configured. |
| 7 | Users can log in | Ask a team member to log in with their existing credentials. |
| 8 | New modules appear | Check the sidebar for new items: Contracts, Commissions (under Finance). |
| 9 | Roles & Permissions | Go to Settings → Roles & Permissions. Verify new permissions appear (SaaS, Contracts, Commissions). |
| 10 | Create a test shipment | Create a new shipment to verify the full workflow still works end-to-end. |
10. Rollback — How to Revert If Something Goes Wrong
If the upgrade causes issues, you can revert to the previous version using your backup:
Restore Files
# Put the app in maintenance mode
php artisan down
# Restore from backup
cp -r /var/www/deprixa-plus-backup-v1.3.1/* /var/www/deprixa-plus/
# Or extract from archive
tar -xzf deprixa-plus-backup-v1.3.1.tar.gz -C /var/www/
Restore Database
# Drop and recreate the database, then import
mysql -u your_db_user -p your_database_name < backup_v1.3.1_20260511.sql
Go Live
# Clear caches and bring the app online
php artisan optimize:clear
php artisan up
Data Created After Upgrade Will Be Lost
If you created new shipments, invoices, or users after the upgrade and then rollback, those new records will be lost because you're restoring a pre-upgrade database snapshot. This is why it's important to verify the upgrade works immediately — before creating new business data.
11. Version Upgrade Path — From Any Version
You can upgrade directly from any previous version to the latest. You do NOT need to install intermediate versions one by one.
| From Version | To Version | Method | Notes |
|---|---|---|---|
| v1.0.x | v1.4.0 | Manual (Method 2) or Automatic | Direct upgrade. All intermediate migrations run automatically in sequence. |
| v1.1.x | v1.4.0 | Manual or Automatic | Direct upgrade. Same process. |
| v1.2.x | v1.4.0 | Manual or Automatic | Direct upgrade. Same process. |
| v1.3.0 | v1.4.0 | Manual or Automatic | Direct upgrade. Same process. |
| v1.3.1 | v1.4.0 | Manual or Automatic | Direct upgrade. Most common scenario for CodeCanyon buyers. |
| v1.3.2 | v1.4.0 | Manual or Automatic | Direct upgrade. Minimal changes needed. |
Why Direct Upgrades Work
Laravel's migration system tracks every migration that has run in the migrations table. When you upgrade from v1.0 to v1.4, all 50+ migrations between those versions run in order. Each migration checks if the table/column already exists before creating it, so there are no duplicate errors.
12. Frequently Asked Questions
No, absolutely not. Your shipments are stored in the shipments table in the database. The upgrade process never drops, truncates, or modifies this table. All your shipment records, tracking numbers, statuses, and history are 100% preserved.
No. Your company name, logo, branding colors, SMTP configuration, API keys, and all other settings in the settings table are never touched by the upgrade process. No migration or seeder writes to the settings table.
No. User accounts and hashed passwords in the users table are never modified. All users can log in with their existing credentials after the upgrade.
No. The RolesAndPermissionsSeeder uses firstOrCreate — it only creates roles and permissions that don't exist yet. If you created custom roles (e.g., "Warehouse Manager"), they remain untouched. The seeder only updates the 5 default roles.
No. All your payment gateway and notification channel configurations are stored in the database and are not affected by the upgrade. Your API keys, webhook secrets, and SMTP credentials remain in place.
The app will remain in maintenance mode. You can either: (a) Fix the issue and re-run php artisan deprixa:upgrade, or (b) Restore from your backup. Common causes of failure: insufficient disk space, MySQL timeout on large databases, or missing PHP extensions.
For Method 1 (Automatic) — No, it's done entirely from the browser. For Method 2 (Manual) and Method 3 (Command) — Yes, SSH access is required. If your host doesn't offer SSH, use Method 1.
Typically 2-5 minutes depending on your server speed and database size. The maintenance window is brief — users will see a maintenance page during this time.
No. The update package includes pre-compiled JavaScript and CSS in the public/build/ directory. Node.js is not required on the production server for upgrades.
Yes. You can upgrade directly from any version to the latest. Laravel's migration system runs all pending migrations in order. You do not need to install v1.2, then v1.3, then v1.4 — a single upgrade handles everything.
New modules (Contracts, Commissions, SaaS Billing) are installed but empty. They appear in the sidebar only if the user's role has the corresponding permissions. If you don't need them, simply don't assign the permissions and they won't be visible to your team.
No. The .env file is never modified by the upgrade process. Your database credentials, APP_KEY, APP_URL, and all environment variables remain unchanged. However, the new version may support additional optional .env variables — check the changelog for details.
Need Help?
If you encounter any issues during the upgrade, contact support with: your current version, the error message, and a screenshot of the terminal output (if using SSH). Check the Changelog for the full list of changes in each version.