UPGRADE.md
This guide helps you safely upgrade your UnoPim installation. Follow the manual upgrade steps or use the automated upgrade script for minor patches.
Review the CHANGELOG and the release notes on the releases page for the changes included in each version before upgrading.
<a name="manual-upgrade-steps"></a>
Before starting the upgrade process:
mysqldump or your preferred method:mysqldump -u your_db_user -p your_db_name > backup.sql
Using PostgreSQL? Use pg_dump instead:
pg_dump -U your_db_user your_db_name > backup.sql
Make sure to keep these backups safe in case the upgrade process encounters any problem.
.zip file for the latest versionCopy the following files from your existing UnoPim project to the newly extracted version:
.env filestorage/ folder (to keep your data intact like images)This ensures your environment settings and any uploaded files stay intact during the upgrade.
Navigate to the extracted folder, and install the necessary dependencies with Composer:
composer install
Run the following command to apply any necessary database schema updates:
php artisan migrate
Ensure that the system is cleared of any cached data and properly linked:
php artisan optimize:clear
php artisan storage:link
This step will optimize your application and create the necessary symbolic link to your storage folder.
If you are using a process manager like Supervisor to manage the queue:work command, restart the relevant service to apply the changes. Replace unopim-worker with your actual worker name, if different:
sudo supervisorctl restart unopim-worker
If Elasticsearch service is running, you must clear and rebuild the indexes to reflect updated structures or data:
php artisan unopim:elastic:clear # Clear existing Elasticsearch data
php artisan unopim:product:index # Re-index all products
php artisan unopim:category:index # Re-index all categories
After following these steps, your UnoPim should be successfully upgraded. Test your application thoroughly to make sure everything works as expected.
<a name="automated-upgrade-script"></a>
Although the upgrade script automatically creates the backup of your project as well as the database, For additional safety you can manually keep the backups in case the upgrade process encounters any problems.
Before starting the upgrade process:
mysqldump or your preferred method:mysqldump -u your_db_user -p your_db_name > backup.sql
Using PostgreSQL? Use pg_dump instead:
pg_dump -U your_db_user your_db_name > backup.sql
Make sure to keep these backups safe in case the upgrade process encounters any problem.
Place the script in the directory of your UnoPim project and execute it from the terminal:
./upgrade.sh
After following these steps, your UnoPim should be successfully upgraded. Test your application thoroughly to make sure everything works as expected.