Technical Anshu
Tutorials Blog
Install Guide

Install Bagisto with Composer Step by Step

Composer is the one tool that does the heavy lifting in a Bagisto install — it downloads Bagisto and every library it depends on. This page is the install in exact order, with the checks that stop the three most common failures before they happen.

By Technical AnshuComposer and LaravelAbout 10 minutes of commands
Watch the install happen in the video above, then follow this page command by command on your own machine

Most failed Bagisto installs fail for boring reasons: a PHP version that is too old, a missing PHP extension, or a database password typed wrong in one file. The good news is that all three are visible before you start if you run three tiny checks. Do the checks, then the install itself is two commands and a short wizard. Everything below works the same on a Linux server, and on Windows under XAMPP for learning.

Terminal - the install in four lines (example)
$ php -v PHP 8.3.x (cli) $ composer --version Composer version 2.x $ composer create-project bagisto/bagisto $ cd bagisto $ php artisan bagisto:install

Example terminal session. Exact version numbers differ by machine; what matters is a recent PHP 8.x and Composer 2 before the create-project command runs.

1

Check the Machine First

  1. Run php -v and confirm a recent PHP 8.x. The current Bagisto 2.x line needs modern PHP — the latest release targets PHP 8.4, and recent releases accept the PHP 8.3 to 8.4 range. Check the official documentation for your exact version.
  2. Run composer --version and confirm Composer 2 answers. If the command is not found, install Composer first from its official site.
  3. Run php -m and scan the extension list. Bagisto, like most Laravel apps, needs extensions such as intl, gd, mbstring, openssl, pdo and curl present; a missing one is the top cause of composer stopping mid-install.
  4. Confirm MySQL or MariaDB is running and you know a login that can create databases.
2

Create the Project

Move to the folder that will hold the store (on XAMPP this is inside the web root folder; on a server, your chosen directory) and run composer create-project bagisto/bagisto. Composer downloads the Bagisto skeleton and all its dependencies into a new bagisto folder. This step needs a working internet connection and a few minutes; when it finishes without red errors, the code half of the install is done. Then move in with cd bagisto.

3

Connect the Database

  1. Create an empty database for the store in MySQL (for example through phpMyAdmin or your hosting panel) and note its name, username and password.
  2. In the project folder, copy the example environment file to .env if it is not already there. This one file holds the settings Laravel reads at startup.
  3. Edit the database lines: DB_DATABASE your database name, DB_USERNAME and DB_PASSWORD its login, and set APP_URL to the address the store will open at.
  4. Save the file. A single wrong character here is what later appears as a connection error, so copy the password instead of retyping it.
4

Run the Installer and Open Admin

Run php artisan bagisto:install and answer its questions: it creates the tables, loads the starting data and asks for the admin name, email and password — choose a strong password, this account controls the whole shop. On a hosted server you can instead open the store address in a browser and complete the same steps in the install wizard. When it finishes, run php artisan serve for a local test, open the shown address to see your storefront, and open the same address with /admin at the end to log in to the admin panel. Seeing both pages means the install is complete.

🔴 Install stuck at a red Composer error? Read the last line, not the first. It almost always names the exact missing PHP extension or version. Fix that one thing and run the same command again — Composer safely continues rather than starting over.

Watch the Complete Video Guide

Watch the video for the same install shown live, including the installer questions.

Watch Full Video
Common Questions (FAQ)

Can I install Bagisto on Windows with XAMPP?

Yes, for learning and testing. Bagisto's documentation has long listed Windows with a WAMP or XAMPP environment as workable, because XAMPP provides Apache, PHP and MySQL together. For a live shop taking real orders, Linux hosting is the better home.

The installer asks for a database I have not made. What now?

Pause and create it first: an empty database plus a user with full rights on it, in phpMyAdmin or your hosting panel. The installer fills an existing database with tables; it does not create the database itself.

Where is the admin panel after installing?

At your store address followed by /admin — for a local test that is the address php artisan serve shows, plus /admin. Log in with the admin email and password you set during the installer.

This guide is based on the Technical Anshu video on creating a shopping website with Bagisto. Stuck on any step? Ask in the video comments and you will get an answer.