AssetHub Upgrade Guide

Upgrade from AssetHub v4.0.0 to v5.0.0

This guide walks you through updating an existing v4.0 installation while keeping your database, uploaded files, translations, and configuration intact. v5.0 is a non-breaking fix release — no new database migrations are required.

Applies to: v4.0.0 → v5.0.0 Estimated time: 10–20 minutes Main commands: php artisan optimize:clear, php artisan optimize

Overview

AssetHub v5.0.0 fixes three behaviours that v4.0 got wrong: category-specific custom fields on the asset form, custom-field columns in the asset Excel export, and the asset-tag prefix saved in Settings. All v4.0 data — assets, custom field values, appearance colors, translations — stays in place.

Choose your path: Follow exactly one upgrade section below based on where your v4 site runs — Localhost, Hostinger, or cPanel. Backup rules and “do not” warnings apply to all environments.
Item Action
Application code (app/, routes/, public/build/, lang/, etc.) Replace with v5.0 files from CodeCanyon source/
.env Keep your existing file
storage/ (uploads, logs, installed.lock) Keep your existing folder
MySQL database Keep — no migration required for v5.0
Settings (asset_tag_prefix) Keep — v5.0 reads this value when creating new asset tags
Custom fields and their saved values Keep — no data conversion
Existing asset tags (AS-2026-0001, etc.) Keep — only assets created after the upgrade use the saved prefix
Appearance, locales, translation overrides Keep — unchanged from v4.0
Pre-built assets: The CodeCanyon source/ package includes compiled frontend assets in public/build/. On production (Hostinger, cPanel), you do not need Node.js or npm run build on the server.

Before you start

Even for a patch release, back up before upgrading any installation — including localhost if it contains real data.

1. Back up your database

Export your MySQL database via phpMyAdmin, Adminer, or the command line:

mysqldump -u USERNAME -p DATABASE_NAME > assethub-v40-backup.sql

2. Back up your files

  • .env — database credentials, mail settings, APP_KEY
  • storage/ — asset photos, avatars, company logo, logs
  • storage/app/public/ — all uploaded media

3. Put the site in maintenance mode (recommended for production)

php artisan down
# ... perform upgrade ...
php artisan up

On Hostinger Single without Terminal, skip this or use a temporary PHP script pattern in the Hostinger section.

4. Download v5.0.0 from CodeCanyon

Go to your CodeCanyon Downloads page and download AssetHub v5.0.0. Use the contents of the source/ folder (application files). Open documentation/index.html in the package root for the full buyer install guide.

Do not visit /install after upgrading. The web installer runs migrate:fresh and will wipe your database.

What's new in v5.0.0

After upgrading, these fixes apply without changing your existing v4.0 records:

  • Custom fields by category — a field assigned to one category now appears on Assets → Add / Edit when that category is selected. Fields set to All categories still show for every asset. In v4.0, category-specific fields stayed hidden unless they were applied to all categories.
  • Excel export — Assets → Export adds one column per active custom field (the column heading is the field label). Cells are empty when an asset has no value. The import template is unchanged: importing that Excel file back does not write custom-field columns.
  • Asset tag prefix — new assets use the prefix saved in Settings → General → Asset Tag Prefix (for example IT-2026-0001). v4.0 always generated AS-… even after you changed the setting. Tags already created stay as they are.
  • App version — Settings → System → Environment shows 5.0.0. If your .env still has APP_VERSION=4.0.0, change it to 5.0.0 or remove the line.

Appearance, branding, translations, and every other v4.0 feature keep working. No database tables are added or altered.

Prefix rules: the saved prefix is trimmed, uppercased, and limited to letters and digits. An empty or invalid value falls back to AS. The next number is counted separately for each prefix and year.

Upgrading on Localhost

For developers running AssetHub v4.0 locally (Laragon, XAMPP, WAMP, Valet, Sail, or php artisan serve).

Typical path: E:\...\Asset Manager\ or a clone of the project. Your local URL is usually http://localhost:8000 or a Laragon virtual host.
  1. Get v5.0 application files

    Option A — Git: Pull or merge the v5.0 release branch/tag into your working copy.

    Option B — CodeCanyon package: Extract v5.0 source/ into your project folder, overwriting app/, routes/, resources/, public/build/, lang/, config/, etc.

    Do not overwrite your local .env or storage/ (uploads, logs).

  2. Install PHP dependencies (if vendor changed)

    cd /path/to/asset-manager
    composer install

    v5.0 does not add new Composer packages. Run this only if composer.lock changed or vendor/ was not copied from the package.

  3. Rebuild frontend (local dev only)

    If you edit Vue/JS locally, rebuild assets. The CodeCanyon package already ships public/build/:

    npm install
    npm run build

    Remove public/hot if it exists (Vite dev marker) before testing production-style assets.

  4. Clear caches (required)

    php artisan optimize:clear
    php artisan optimize

    No migrate step is needed for v4.0 → v5.0. You may run php artisan migrate anyway — it will report “Nothing to migrate”, which is normal.

    If .env contains APP_VERSION=4.0.0, set it to APP_VERSION=5.0.0 or delete the line. Otherwise Settings → System keeps showing 4.0.0.

  5. Verify locally

    • Start the server: php artisan serve (or use Laragon)
    • Log in as admin — confirm v4.0 data (assets, custom field values, settings) is intact
    • Custom fields — open a field limited to one category, then Assets → Add and select that category. The field should appear. Switch category and confirm it hides again.
    • Export — export the asset list to Excel and confirm a column exists for each active custom field
    • Asset tag — set Settings → General → Asset Tag Prefix to a value other than AS, save, and register a new asset. The tag should start with that prefix. An older asset tag must stay unchanged.
    • Settings → System — confirm App Version shows 5.0.0

Localhost checklist

  • Back up local database (if not disposable)
  • Replace/pull v5.0 code; keep .env and storage/
  • composer install (if needed)
  • npm run build (if developing frontend)
  • php artisan optimize:clear and php artisan optimize
  • Test category custom fields, Excel export, and a new asset tag
  • Do not visit /install

Upgrading on Hostinger

For customers running AssetHub v4.0 on Hostinger (Single, Premium, Business, or VPS). Steps use hPanel terminology.

Hostinger Single has no SSH/Terminal. v5.0 does not require migrate. Use a temporary Cron Job or one-time PHP script (Methods A/B below) only for optimize:clear and optimize. Premium/Business/VPS may use SSH (Method C).

Step 1 — Back up via hPanel

  1. Login to Hostinger hPanel → Hosting → Manage for your domain.
  2. Database: Databases → phpMyAdmin → select your AssetHub database → Export → Quick → Go. Save the .sql file.
  3. Files: Files → File Manager → public_html/ (or your Laravel root).
  4. Enable Settings → Show hidden files to see .env.
  5. Download .env and compress/download the entire storage/ folder.

Step 2 — Check PHP version

  1. Advanced → PHP Configuration
  2. PHP 8.2 or 8.3 (same as v4.0)

Step 3 — Upload v5.0 files (keep your data)

  1. On your computer, extract the v5.0 CodeCanyon package and zip the contents of the source/ folder.
  2. In File Manager, open public_html/ where v4.0 already lives.
  3. Upload the ZIP and Extract. Allow overwrite of app/, public/, vendor/, lang/, resources/, etc.
  4. Restore if overwritten: re-upload your saved .env and storage/.
  5. Delete the upload ZIP after extraction.
  6. Confirm artisan, .htaccess, and storage/installed.lock still exist.
Never replace .env with the default from the v5.0 package on a live site — you will lose DB credentials, mail config, and APP_KEY.

Step 4 — Clear caches (no migrate needed)

Replace uXXXXXX with your Hostinger username. Find the full path: File Manager → right-click artisan → Properties.

Method A — Temporary Cron Job (recommended for Single)

  1. Advanced → Cron Jobs → Create Cron Job
  2. Type: Custom
  3. Command (run once, then delete the cron job):
    /usr/bin/php /home/uXXXXXX/public_html/artisan optimize:clear
  4. Schedule: Every minute (* * * * *) for 1–2 minutes only
  5. Create a second one-time cron (delete after it runs):
    /usr/bin/php /home/uXXXXXX/public_html/artisan optimize
  6. Check storage/logs/laravel.log or log in to confirm the site loads.

Method B — One-time PHP script (alternative)

  1. Create public_html/upgrade-v40.php with the script below. Set a strong secret key.
  2. Visit https://yourdomain.com/upgrade-v40.php?key=YOUR-SECRET-KEY once.
  3. Delete the file immediately after success.
<?php
// DELETE THIS FILE IMMEDIATELY AFTER USE
$secret = 'YOUR-SECRET-KEY-HERE';
if (($_GET['key'] ?? '') !== $secret) { http_response_code(403); exit('Forbidden'); }

define('LARAVEL_START', microtime(true));
require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();

Illuminate\Support\Facades\Artisan::call('optimize:clear');
echo Illuminate\Support\Facades\Artisan::output() . "\n";

Illuminate\Support\Facades\Artisan::call('optimize');
echo Illuminate\Support\Facades\Artisan::output() . "\n";

echo "Done. DELETE upgrade-v40.php now.\n";

Method C — SSH / Terminal (Premium, Business, VPS)

cd ~/public_html
php artisan optimize:clear
php artisan optimize

Step 5 — Verify cron job (unchanged from v3)

Your existing schedule:run cron should still work:

/usr/bin/php /home/uXXXXXX/public_html/artisan schedule:run

Schedule: every minute. Do not remove it when deleting temporary upgrade cron jobs.

Step 6 — Test the upgrade

  • Login — confirm v4 data (assets, custom field values, settings) is intact
  • Add an asset in a category that has its own custom field — the field must show
  • Export the asset list and confirm custom-field columns
  • Register one new asset and confirm the tag uses the prefix from Settings → General
  • Uploaded images still display (storage/app/public/ via /files/)
  • Settings → System — App Version shows 5.0.0

Hostinger checklist

  • Export database via phpMyAdmin
  • Download .env and storage/
  • Upload/extract v5.0 source/ into public_html/
  • Re-upload .env and storage/ if overwritten
  • Run optimize:clear + optimize (Cron, PHP script, or SSH)
  • Test category custom fields, Excel export, and a new asset tag
  • Do not visit /install

Upgrading on cPanel

For customers running AssetHub v4.0 on any hosting that uses cPanel (shared hosting, reseller, or managed VPS with cPanel).

Many cPanel hosts include Terminal (Advanced → Terminal) or SSH. If available, use Method A for the fastest upgrade. If not, use temporary Cron Jobs like Hostinger Single.

Step 1 — Back up via cPanel

  1. Login to cPanel for your account.
  2. Database: Databases → phpMyAdmin → Export → Quick → Go. Save the .sql file.
  3. Files: File Manager → download .env and storage/.

Step 2 — Check PHP version

cPanel → Software → Select PHP Version — PHP 8.2 or 8.3.

Step 3 — Upload v5.0 files

  1. Zip the contents of the v5.0 CodeCanyon source/ folder.
  2. File Manager → navigate to your Laravel root (where artisan lives).
  3. Upload the ZIP → Extract → overwrite application files.
  4. Re-upload your backed-up .env and storage/ if they were replaced.

Step 4 — Clear caches (no migrate needed)

Method A — cPanel Terminal (if available)

cd ~/public_html
php artisan optimize:clear
php artisan optimize

Method B — SSH (if enabled)

ssh USERNAME@yourdomain.com
cd ~/public_html
php artisan optimize:clear
php artisan optimize

Method C — Temporary Cron Job (no Terminal)

  1. cPanel → Advanced → Cron Jobs
  2. Add a Once Per Minute cron (temporarily):
    /usr/local/bin/php /home/USERNAME/public_html/artisan optimize:clear
  3. Wait 1–2 minutes, delete the cron, then run optimize the same way.

Method D — One-time PHP script

Create upgrade-v40.php in your web root, visit it once with a secret key, then delete it. Use the script from the Hostinger section (Step 4, Method B).

Step 5 — Verify scheduled tasks cron

/usr/local/bin/php /home/USERNAME/public_html/artisan schedule:run

Step 6 — Test the upgrade

  • Log in as Admin
  • Settings → Branding — test browser tab title
  • Add an asset in a category that has its own custom field — the field must show
  • Export the asset list and confirm custom-field columns
  • Register one new asset and confirm the tag uses the prefix from Settings → General

cPanel checklist

  • Export database (phpMyAdmin)
  • Download .env and storage/
  • Upload/extract v5.0 source/
  • Restore .env and storage/ if needed
  • Run optimize:clear + optimize
  • Test category custom fields, Excel export, and a new asset tag
  • Do not visit /install

Database migrations

v5.0.0 does not ship any new migrations. Custom field values, the asset_tag_prefix setting, and existing asset tags already live in the database from v4.0. v5.0 only changes how the application reads them.

Expected output if you run migrate anyway:
php artisan migrate --force
# Nothing to migrate.

This is normal and safe. You do not need to run migrate for v4.0 → v5.0.

Backward compatibility

Existing asset tags are not rewritten. Custom field values already saved on assets stay as they are. Appearance colors, locales, and translation overrides from v4.0 are unchanged.

After upgrade — check the three fixes

No extra setup is required. Use these checks to confirm v5.0 is active.

  1. Custom fields on the asset form

    Open Custom Fields and confirm a field is assigned to one category (not All categories). Go to Assets → Add asset, select that category, and confirm the field appears under additional details. Select another category and confirm it hides.

  2. Excel export

    From the asset list, run Export. The spreadsheet should include the usual columns plus one column for each active custom field.

  3. Asset tag prefix

    Open Settings → General, set Asset Tag Prefix, and save. Register a new asset. Its tag should use that prefix. Tags created before the upgrade stay unchanged.

  4. App version

    Open Settings → System → Environment. It should show 5.0.0. If it still shows 4.0.0, your .env has APP_VERSION=4.0.0 — update or remove that line, then run php artisan optimize:clear.

Import: the Excel import template does not include custom-field columns. Do not re-import an exported asset file expecting those columns to be saved.

Do NOT do this

The following actions will erase or corrupt your data:

Action Why it's dangerous
Visit /install again Runs migrate:fresh — drops all tables and wipes your database.
Delete storage/installed.lock and reinstall Same as above — triggers a fresh install.
php artisan migrate:fresh Drops every table and re-runs all migrations from scratch.
php artisan migrate --seed on production May insert demo data into your live database.
Replace .env with the default v5.0 copy You'll lose DB credentials, mail config, and APP_KEY.
Delete storage/app/public/ Removes all uploaded asset photos, avatars, and documents.
Data loss warning: If you accidentally ran the installer or migrate:fresh, restore from your database backup immediately.

Quick checklist

Universal steps — combine with your environment section above:

  • Back up MySQL database
  • Back up .env and storage/
  • Download AssetHub v5.0.0 from CodeCanyon
  • Upload v5.0 source/ files; keep .env and storage/
  • Run php artisan optimize:clear and php artisan optimize
  • If .env sets APP_VERSION=4.0.0, change it to 5.0.0
  • Log in — verify v4.0 data, category custom fields, Excel columns, and a new asset tag
  • Do not visit /install

Troubleshooting

Category custom field still missing on the form

Confirm v5.0 public/build/ was uploaded, then hard-refresh (Ctrl+F5). Select the category the field belongs to — fields for other categories stay hidden until that category is chosen. Fields set to All categories show even before a category is selected.

New assets still use the AS prefix

  • Open Settings → General, set Asset Tag Prefix, and click Save.
  • Register a new asset. Tags created in v4.0 are not rewritten.
  • The prefix may contain only letters and digits. Symbols are removed; an empty value falls back to AS.
  • Run php artisan optimize:clear if the setting was saved but new tags still start with AS.

Excel export has no custom-field columns

Confirm the uploaded app/Exports/AssetsExport.php is from v5.0 and the custom fields are active. Inactive fields are omitted. Export again after php artisan optimize:clear.

App version still shows 4.0.0

Check .env for APP_VERSION=4.0.0 and change it to 5.0.0, or delete the line. Then run php artisan optimize:clear.

“Nothing to migrate”

Normal for v4.0 → v5.0. No migrations are required. Proceed with cache clear and testing.

500 error after upload

php artisan optimize:clear
chmod -R 775 storage bootstrap/cache

Check storage/logs/laravel.log. Restore .env if overwritten.

Blank page / Vite dev URLs in HTML

Ensure public/hot does not exist on the server and public/build/ from v5.0 was uploaded.

Upgrading from v3.x, v2.x, or v1.x?

Reach v4.0 first, then use this guide. From v3.1 use upgrade-guide-v3.1-to-v4.0.html. From v3.0 use upgrade-guide-v3-to-v3.1.html and then the v4.0 guide. From v2 or v1, use upgrade-guide-v2-to-v3.html or upgrade-guide-v1-to-v2.html.

Need more help?

Open documentation/index.html in your v5.0 CodeCanyon package, or contact the author through the CodeCanyon item support tab.