Bagisto Installation and Configuration
Bagisto deploys on a standard LEMP stack. Installation takes from several hours to 1-2 business days including environment configuration, email setup, payment methods, and initial data import.
Server requirements
| Component | Minimum | Recommended |
|---|---|---|
| PHP | 8.1 | 8.2+ |
| MySQL / MariaDB | 8.0 / 10.3 | MySQL 8.0 |
| Composer | 2.x | 2.x |
| Node.js | 16 | 18 LTS |
| RAM | 1 GB | 2 GB+ |
PHP extensions: BCMath, Ctype, cURL, DOM, Fileinfo, JSON, Mbstring, OpenSSL, PCRE, PDO, Tokenizer, XML, GD or Imagick.
Installation via Composer
composer create-project bagisto/bagisto:^2.2 myshop
cd myshop
cp .env.example .env
Edit .env:
APP_URL=https://myshop.example.com
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=bagisto
DB_USERNAME=bagisto_user
DB_PASSWORD=secret
CACHE_DRIVER=redis
QUEUE_CONNECTION=redis
SESSION_DRIVER=redis
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
Run installer:
php artisan bagisto:install
The command executes migrations, seeders, publishes assets, and creates the first admin. After — build frontend:
npm install
npm run build
Nginx configuration
server {
listen 80;
server_name myshop.example.com;
root /var/www/myshop/public;
index index.php;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
After configuration enable SSL via Certbot: certbot --nginx -d myshop.example.com.
Queue configuration (Supervisor)
Bagisto actively uses queues for sending emails, generating invoices, and webhook notifications.
[program:bagisto-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/myshop/artisan queue:work redis --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=www-data
numprocs=2
redirect_stderr=true
stdout_logfile=/var/www/myshop/storage/logs/worker.log
stopwaitsecs=3600
supervisorctl reread
supervisorctl update
supervisorctl start bagisto-worker:*
Initial configuration in admin panel
After login at /admin configure:
Channels and locales
Channel is a separate store "window" with its own domain, currency, and language. For a multilingual store, create one channel with multiple locales.
Taxes
Catalog → Taxes → Tax Categories — create categories (e.g., VAT 20%). Then bind to tax groups and regions via Tax Rates.
Shipping methods
Built-in: FlatRate, Free Shipping. For SDEK or Russian Post, a package or custom provider is needed — connected in config/carriers.php.
Payment methods
Built-in: Cash On Delivery, Money Transfer, PayPal. Custom gateways are registered in config/paymentmethods.php and implement Webkul\Payment\Payment interface.
Email configuration
MAIL_MAILER=smtp
MAIL_HOST=smtp.example.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=secret
MAIL_ENCRYPTION=tls
[email protected]
MAIL_FROM_NAME="My Store"
Email templates are published via command:
php artisan vendor:publish --tag=bagisto-mail-views
Then edited in resources/views/vendor/shop/emails/.
Scheduler cron
* * * * * cd /var/www/myshop && php artisan schedule:run >> /dev/null 2>&1
The scheduler handles shopping cart cleanup, sitemap generation, and currency rate updates (if a provider is enabled).
Directory permissions
chmod -R 775 storage bootstrap/cache
chown -R www-data:www-data /var/www/myshop
Post-installation checklist
- Run
php artisan config:cache && php artisan route:cache - Configure database backup (cron + mysqldump or
spatie/laravel-backup) - Install Redis and verify connection via
php artisan tinker→Redis::ping() - Test email sending via test order
- Configure queue monitoring — Laravel Horizon (
composer require laravel/horizon) - Verify sitemap generation at
/sitemap.xml







