Version ie v5.3.46
Environment Docker (local: nginx + php-fpm + mysql:8.0) + cPanel Shared Hosting (production)
Checklist
- Cannot replicate on demo site (migration-specific issue)
-
- Have searched existing issues
-
- Have inspected logs in storage/logs/laravel.log — no relevant errors found
Describe the bug
After migrating an old Invoice Ninja v5 database to a new installation (local Docker + production cPanel/shared hosting), companies exist in the database but are not properly visible in the UI.
Setup:
- Invoice Ninja v5 (self-hosted)
-
- Docker locally (nginx + php-fpm + mysql:8.0)
-
- cPanel shared hosting on production
-
- DB imported via MySQL dump
The problem:
All company data exists in the database — confirmed:
- DB imported via MySQL dump
- 8 companies in the
companiestable, all withaccount_id = 1 -
- All companies have correct names in the
settingsJSON field
- All companies have correct names in the
-
company_usertable correctly linksuser_id = 1(owner) to all 8 companies
-
- Invoice counts per company: 629, 234, 31, 17, 15, 14, 2 — data is there
-
accountstable: 1 row,default_company_id = 2✓
-
APP_KEYis the same between old and new installation
-
dbcolumn incompanies=mysqlfor all rows
On production: Only the primary company (id=2, Flyvision SIA) is visible with its invoices. All other companies appear in the company switcher but show no data (empty clients, invoices, etc.).
Locally: No companies visible at all after import.
Steps To Reproduce
- Export MySQL dump from working Invoice Ninja v5 instance
-
- Set up fresh Invoice Ninja v5 on Docker (local) or cPanel (production)
-
- Import the MySQL dump into the new installation
-
- Use the same APP_KEY as the original installation
-
- Log in and attempt to switch between companies
Expected Behavior
All 8 companies should be fully accessible in the UI with all their data (clients, invoices, etc.) visible when switching between companies — just as they were in the original installation.
Additional context
What I’ve tried:
php artisan optimize:clear-
php artisan config:clear
-
php artisan cache:clear
Could this be related to thecompany_tokenstable or something with user authentication tokens not matching after migration? Any guidance appreciated.