Keeping your Bagisto eCommerce store updated is essential for performance, security, and compatibility with modern packages and plugins. Whether you're upgrading from Bagisto 1.x or an older 2.x version, this guide walks you through the entire process step-by-step.
⚠️ Note: This upgrade process will bring only Bagisto’s official (first-party) packages. Any custom or third-party packages you’ve added won’t be carried over automatically. You will need to manually copy them into the
packages/
folder and reconfigure them afterward.
Before upgrading anything, take a full backup of:
Your Bagisto project skeleton (files)
Your MySQL database
You can back up the database using phpMyAdmin or command line tools like mysqldump
Go to the official Bagisto GitHub repository and download the latest stable release.
Make sure to download the correct version that matches your requirements.
In phpMyAdmin or via MySQL CLI:
Create a new database.
Import the SQL dump file (your old database backup).
This ensures your store’s data will be preserved in the new setup.
.env
with Database CredentialsIn your newly downloaded Bagisto code:
Copy the .env.example
file to .env
Update the following fields with your new database credentials:
DB_DATABASE=your_database_name
DB_USERNAME=your_db_username
DB_PASSWORD=your_db_password
Open terminal inside your project folder and run:
composer create-project
This will install all necessary PHP packages and dependencies required by Bagisto.
php artisan optimize
This clears and rebuilds config, routes, and compiled classes to make your application run smoothly.
php artisan migrate
This command runs database migrations needed by the latest Bagisto version.
Copy the storage/
folder from your old Bagisto project and paste/replace it in the new project.
This will restore all your:
Product images
Banners
Uploaded files
php artisan storage:link
This creates a symbolic link from public/storage
to storage/app/public
, so all uploaded files are publicly accessible.
Step 10: Publish Vendor Assets
php artisan vendor:publish --all
This command publishes all package assets like configuration files, views, and translations to your project.
As mentioned earlier, custom packages are not included automatically when upgrading. Here's what to do:
Manually copy each custom package folder into the new packages/
directory.
Register them again in composer.json
or as service providers if necessary.
Reconfigure aliases, routes, and other settings as needed.
Make sure your store is loading correctly.
Test all major flows like product pages, cart, checkout, and admin panel.
Check for broken links or missing images.
Upgrading Bagisto to the latest version may seem complex, but following this structured guide makes it much easier and safer. Always back up first, and remember to handle any custom packages separately. Stay updated to enjoy new features, performance improvements, and better security!
Need help upgrading Bagisto or customizing your store?
We at Vfix Technology specialize in Bagisto development, custom modules, and eCommerce integration.
📞 WhatsApp us: https://wa.me/918447525204