2.5 KiB
Updating UNIT3D
Update UNIT3D to the latest version by reviewing the release notes and following the steps below:
1. Create Backup
UNIT3D offers built-in backups. Refer to the Backups documentation for usage.
[!IMPORTANT] Ensure there is a complete backup before proceeding.
2. Enter Maintenance Mode
cd /var/www/html
php artisan down
3. Update UNIT3D
[!NOTE] Before running the update, review the new release’s minimum requirements to ensure the environment meets them.
-
Proceed to update:
The updater will fetch the latest commits from the upstream repository and stage them for installation.
cd /var/www/html php artisan git:update
There will be a prompt to confirm each step; choose
yes
to overwrite with the new version.Start the update process (yes/no) [yes]: > yes
-
Accept upstream files:
When prompted for each changed file, type
yes
to overwrite the local copy or pressEnter
to accept the default shown in brackets.Update config/unit3d.php (yes/no) [yes]: > yes git checkout origin/master -- config/unit3d.php [============================] (Done!)
-
Run new migrations:
Run new migrations (php artisan migrate) (yes/no) [yes]: > yes
-
Install new packages:
Install new packages (composer install) (yes/no) [yes]: > yes
-
Compile assets:
Compile assets (bun run build) (yes/no) [yes]: > yes
Troubleshooting Clean-up
The following commands are optional and should be run only as needed to resolve specific errors:
-
Finish any migrations not completed:
sudo php artisan migrate
-
Reinstall dependencies:
composer install --prefer-dist --no-dev -o
-
Clear caches:
sudo php artisan cache:clear && \ sudo php artisan queue:clear && \ sudo php artisan auto:email-blacklist-update && \ sudo php artisan auto:cache_random_media && \ sudo php artisan set:all_cache
-
Rebuild static assets:
sudo bun install && sudo bun run build
-
Restart services:
sudo systemctl restart php8.4-fpm && \ sudo php artisan queue:restart && \ sudo php artisan up
-
If running external UNIT3D-Announce, restart the supervisor services:
sudo supervisorctl reread && \ sudo supervisorctl update && \ sudo supervisorctl reload