Installation β
This guide will walk you through installing Bagisto using different methods. Choose the one that best fits your needs.
π Quick Installation (Recommended) β
The fastest way to get Bagisto up and running:
Prerequisites β
Before starting, ensure you have:
- PHP 8.2 or higher
- Composer 2.5 or higher
- MySQL 8.0.32 or higher
- Web server (Apache/Nginx)
System Requirements
If you haven't checked the system requirements yet, please review the Before You Start guide.
Step 1: Create Project β
Open your terminal and run:
composer create-project bagisto/bagisto my-bagisto-store
Step 2: Navigate to Directory β
cd my-bagisto-store
Step 3: Run Installation β
php artisan bagisto:install
Follow the interactive prompts to configure your application, database, and admin account.
Step 4: Start Development Server β
php artisan serve
Your Bagisto store will be available at http://localhost:8000
π₯οΈ GUI Installation β
If you prefer a web-based installer:
Important
Ensure Composer is installed and your web server is properly configured before proceeding.
Method 1: Using Composer β
composer create-project bagisto/bagisto
Configure your web server's document root to the public/
directory inside your Bagisto project (e.g., /path/to/bagisto/public
), then visit:
http://localhost/
Method 2: Download Package β
- Download Bagisto from the official website
- Extract the downloaded file
- Navigate to the project directory
- Run:
composer install
- Configure your web serverβs document root to point to the
public/
directory inside your Bagisto project (e.g.,/path/to/bagisto/public
), then open your browser and visit:
http://localhost/
π§ Manual Installation β
For advanced users who want complete control over the installation process.
Important
Ensure Composer is installed and your web server is properly configured before proceeding.
Step 1: Get Bagisto β
You can get Bagisto in two ways:
Method 1: Composer
Create a new project using Composer. See GUI Installation - Method 1 for step-by-step instructions.Method 2: Download Package
Download the package from the official website or clone the GitHub repository. Refer to GUI Installation - Method 2 for details.
Step 2: Configure Environment β
Copy environment file and generate key:
bashcp .env.example .env php artisan key:generate
Edit your
.env
file with database credentials and application settings.
Step 3: Setup Store β
Database Configuration
This step assumes your database is already created and configured in the .env
file. Make sure your database connection details are correct before proceeding.
php artisan migrate:fresh --seed
php artisan storage:link
php artisan optimize:clear
Step 4: Launch Store β
php artisan serve
Visit http://localhost:8000
to access your store.
π³ Docker Installation β
Perfect for containerized environments and easy deployment across different systems.
Prerequisites β
- Docker installed on your system
- Docker Compose (for Method 2)
Method 1: Using Docker Hub (Recommended) β
The quickest way to get Bagisto running with Docker:
Step 1: Pull Bagisto Image β
docker pull webkul/bagisto:2.3.6
Step 2: Run Container β
docker run -it -d -p 80:80 webkul/bagisto:2.3.6
Port Configuration
If port 80 is already in use, you can use a different port:
docker run -it -d -p 8082:80 webkul/bagisto:2.3.6
Then access at http://localhost:8082
Step 3: Access Your Store β
Open your browser and visit http://localhost
Method 2: Using Docker Compose β
For more control and customization:
Step 1: Clone Repository β
git clone https://github.com/bagisto/bagisto-docker.git bagisto-docker
cd bagisto-docker
Step 2: Configure Docker Compose β
Edit docker-compose.yml
to adjust ports and settings:
version: '3.1'
services:
bagisto-php-apache:
build:
args:
container_project_path: /var/www/html/
uid: 1000
user: $USER
context: .
dockerfile: ./Dockerfile
image: bagisto-php-apache
ports:
- 80:80
volumes:
- ./workspace/:/var/www/html/
bagisto-mysql:
image: mysql:8.0
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
volumes:
- ./.configs/mysql-data:/var/lib/mysql/
bagisto-phpmyadmin:
image: phpmyadmin:latest
restart: always
environment:
PMA_HOST: bagisto-mysql
PMA_USER: root
PMA_PASSWORD: root
ports:
- 8080:80
Step 3: Launch Services β
Run the following command to initialize and build the Docker containers:
sh setup.sh
This is a one-time setup script that prepares your environment for Bagisto. It will build the necessary Docker images, install dependencies, and configure your containers according to the Dockerfile and docker-compose.yml
. Once completed, your services will be ready to start and you can access Bagisto through your browser.
Step 4: Access Services β
- Store:
http://localhost
- Admin Panel:
http://localhost/admin
- PHPMyAdmin:
http://localhost:8080
Managing Services
To stop the Docker Compose services, run:
docker compose down
To start them again, use:
docker compose up -d
β΅ Laravel Sail Installation β
Laravel Sail provides a Docker-powered development environment with pre-configured services for Bagisto.
Prerequisites β
- Docker installed on your system
- Docker Compose
Step 1: Get Bagisto β
You can get Bagisto in two ways:
Method 1: Composer
Create a new project using Composer. See GUI Installation - Method 1 for step-by-step instructions.Method 2: Download Package
Download the package from the official website or clone the GitHub repository. Refer to GUI Installation - Method 2 for details.
Step 2: Install Sail β
For a fresh project clone, install dependencies:
docker run --rm \
-u "$(id -u):$(id -g)" \
-v "$(pwd):/var/www/html" \
-w /var/www/html \
laravelsail/php83-composer:latest \
composer require laravel/sail --dev --ignore-platform-reqs
For existing projects:
composer require laravel/sail --dev
Step 3: Configure Environment β
Update your .env
file with Sail-specific configurations:
# Database Configuration
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=bagisto
DB_USERNAME=sail
DB_PASSWORD=password
# Redis Configuration
REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6379
# Mail Configuration
MAIL_MAILER=smtp
MAIL_HOST=mailpit
MAIL_PORT=1025
# Elasticsearch Configuration
ELASTICSEARCH_HOST=http://elasticsearch:9200
Step 4: Build and Start Services β
# Build containers
vendor/bin/sail build --no-cache
# Start services in background
vendor/bin/sail up -d
Step 5: Install Bagisto β
vendor/bin/sail artisan bagisto:install
Step 6: Access Services β
- Store:
http://localhost
- Admin Panel:
http://localhost/admin
- MailPit (Email Testing):
http://localhost:8025
- Kibana (Elasticsearch UI):
http://localhost:5601
Available Services
Sail includes Laravel, MySQL, Redis, Elasticsearch, Kibana, and MailPit for a complete development environment.
Managing Sail
To stop services: vendor/bin/sail down
To restart: vendor/bin/sail up -d
To view logs: vendor/bin/sail logs
π Accessing Your Store β
Production Environment β
Access your store using your domain:
https://yourdomain.com
Info
If your Apache (or Nginx) document root is properly mapped to the public/
directory of your Bagisto project, your store will be accessible at your domain.
Development Environment β
Use the built-in development server:
php artisan serve
Then visit: http://localhost:8000
Admin Panel β
Access the admin panel at:
https://yourdomain.com/admin
Default Credentials:
- Email:
admin@example.com
- Password:
admin123
Security
Change the default admin credentials immediately after installation!
Customer Registration β
Customers can register at:
https://yourdomain.com/customer/register
π± Mobile App Installation β
Bagisto also provides a mobile application for your eCommerce store.
Prerequisites β
Required Versions:
- Bagisto: v2.0.0 or higher
- Android Studio: Flamingo 2022.2.1 or newer
- Flutter: 3.10.1 or higher
- Dart: 3.0.1 or higher
- Xcode: 14.3 or newer (for iOS)
- Swift: 5 or higher
Minimum Device Support:
- Android: API level 21+
- iOS: 12.0+
Before You Start
Make sure you can run a simple "Hello World" Flutter app first to verify your development environment is properly configured.
Clone the repository β
- Open your terminal or command prompt
- Navigate to the directory where you want to save the project
- Use the git clone command followed by the repository URL
git clone https://github.com/bagisto/opensource-ecommerce-mobile-app.git
Install dependencies β
- Navigate to the project's directory
cd <repository-name>
- Run the following command to install the required packages
flutter pub get
Generate Required files β
- Navigate to the project's directory
cd <repository-name>
- Run the following command to generate the required files
flutter pub run build_runner build --delete-conflicting-outputs
Connect a device or emulator β
Physical Device
- Enable USB debugging on your device
- Connect it to your computer using a USB cable.
Emulator
- Start an Android or iOS emulator using your preferred IDE or tools.
Run the Project β
- Use the following command to build and run the project
flutter run
Minimum Versions β
- Android: 21
- iOS: 12
Configurations Steps β
For Setup β
Change the baseUrl as per your store
Path: lib/utils/server_configuration.dart
static const String baseUrl = β....β;
Note
Add the value of the complete URL ending with the GraphQL API endpoint. E.g - https://example.com/graphql
For Theme β
Change the Theme for your app
Path: lib/utils/mobikul_theme.dart
static const Color primaryColor = Color(***********);
static const Color accentColor = Color(***********);
For Push Notification Service β
- Android
Replace "google-services.json".
- iOS
Replace "GoogleService-Info.plist".
Note
Helpful Articles
For Application Title β
Android
- Path: android/app/src/main/AndroidManifest.xml
- Change app name: android:label="***********"
iOS
- Go to the general tab and identity change the display name to your app name
Note
For Homepage Header Title - Go to βassets/language/en.jsonβ (Note: Here, βenβ in en.json refers to the languages that would be supported within the application)
For Splash Screen β
For adding Lottie as Splash Screen
- Path: assets/lottie/splash_screen.json
- After updating the Lottie file, update the βsplashLottieβ in lib/utils/assets_constants.
static const String splashLottie = "assets/lottie/splash_screen.json";
For adding an Image as a Splash Screen
- Path: assets/images/splash.png
- After updating the Image file, update the βsplashImageβ in lib/utils/assets_constants.
static const String splashImage = "assets/images/splash.png";
For App Icon β
- Android: Open the android folder in Android Studio and then right click app > new > Image Asset set Image.
- iOS: Replace the icons over the path > ios/Runner/Assets.xcassets/AppIcon.appiconset