How to migrate Bagisto from version 1.5.0 to Bagisto 2.0?

Updated 6 December 2023

Why we should migrate from Bagisto 1.5.0 to Bagisto 2.0?

In this blog, we are going to learn how to migrate our Bagisto 1.5.0 to Bagisto 2.0. Before migration, we should know first why we need to migrate from Bagisto 1.5.0 to Bagisto 2.0.

Well, there are so many changes and features introduced in Bagisto 2.0 but not possible to explain all the features in this blog so highlighting a few so you just get a brief idea about Bagisto 2.0.

Database tables optimization:-

1. Bagisto 2.0 released with normalized database tables, and modified many tables and columns with meaningful names.
2. Removed unwanted data fields from the database tables.
3. Avoid some generic names like ‘data’ and ‘value’.
4. Squash database tables multiple migration files into a single migration file i.e. Customers, Products, Categories, etc.

Implementation in terms of performance:-

1. Bagisto 2.0 released with more optimization in terms of product rendering, listings, price calculation(if many cart rules, and discount applies on the products), etc on frontend.

2. Bagisto 2.0 improved Core Web Vitals metrics, better user experience in terms of LCP(Largest Contentful Paint), FID(First Input Delay), and CLS(Cumulative Layout Shift) which is very very important once all the terms get good scores for your website then user experiences and more traffic on the website automatically get increase.

3. Bagisto 2.0 comes with FPC(Full Page Cache) feature that plays a very major role for any application in terms of performance.

4. Every new feature of PHP 8 throughout Bagisto 2.0 like name arguments, constructor property promotion, Nullsafe operator, etc implemented that’s very important for fast and secure web applications or websites.

5. Laravel octane implemented in Bagisto 2.0.

There are so many features offered in Bagisto 2.0 introducing few of them:-

1. Bagisto 2.0 released a completely premium look with a default theme for Admin and Frontend.

2. Introduce new DataGrid with many features and, using that more information can be displayed as compared to an old version of Bagisto 1.5.0.

DataGrid has more features like a filter open in side drawer, etc.

3. Reuseable component introduced in Bagisto 2.0 using blade component where direct vue js can be written in any blade file so it can be easy when there is a need to customize any page in Bagisto 2.0.

4. Bagisto 2.0 comes with a modern Tailwind CSS framework and Vite configuration.

5. Abandoned Carts and many charts implemented which represent visualized reports in Bagisto 2.0 in Admin panel.

6. Reportings feature for Sales, Customers, and Products available in Bagisto 2.0 which is graphically visualized for the Admin Panel.

Now it’s time to migrate Bagisto from 1.5.0 to 2.0:-

Let’s get started-

Important Note- There are many major changes in Bagisto 2.0 so it’s important to take a backup of your old database before migration from version 1.5.0 to 2.0.

Steps to Migrate –

1. Get a clone from Bagisto github repository using the below command.

Command – git clone

2. Change your directory using the below command to navigate project folder (bagisto) for run a couple of commands to install Bagisto 2.0

Command- cd bagisto

3. Run the below command to generate the required dependency and create Bagisto project.

Command – composer create-project

4. Update .env file and specify your existing database information

5. Run the below command to load classes

Command- composer dump-autoload

6. Run the below command to clear generated cache for your project

Command – php artisan optimize

7. Run the below command to publish providers and assets for your Bagisto 2.0 project

Command – php artisan vendor:publish –force

7. Final steps to run migration for  Bagisto 2.0 project

Command – php artisan migrate

Once you have done above steps then next need to copy Bagisto 1.5.0 public folder which is located in storage/app/ folder and paste it inside Bagisto 2.0 storage/app/  project folder.

That’s it, now you have successfully migrated from Bagisto 1.5.0 to Bagisto 2.0.

Thank you for reading this tutorial. We hope you found it helpful. If you have any questions or encounter any issues, please feel free to leave a comment below.

Feel free to hire Laravel developer to build your custom solutions on Laravel.
For exploring the available extensions for Bagisto, you can check out

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.

Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home