Skip to main content

Installation Options

There are two ways to install BullMQ PHP: Download the latest release from the releases page (look for bullmq-php-X.X.X.zip), extract it to your project, and configure Composer:
Then run:

Option 2: Install from GitHub (Development)

For development or if you want the latest changes, install directly from the repository:
Installing from VCS requires building the Lua scripts. After composer install, run from the monorepo root:

Requirements

  • PHP: 8.1 or higher
  • Redis: 5.0 or higher (6.2+ recommended for best performance)
  • Composer: For package management

Dependencies

The package automatically installs the following dependencies:
  • predis/predis (^2.0) - Redis client for PHP
  • ramsey/uuid (^4.7) - UUID generation for job IDs
  • rybakit/msgpack (^0.9) - MessagePack serialization for Lua scripts

Verify Installation

Create a simple test file:
Run it:

Redis Setup

BullMQ requires a Redis server:

Run Redis Locally

Use a Managed Redis Service

For production, consider using a managed Redis service:

Connection Configuration

You can configure Redis connections in several ways:

Using Connection Array

Using Redis URI

Sharing a Connection

Common Issues

Redis Connection Errors

If you can’t connect to Redis:
  1. Verify Redis is running: redis-cli ping (should return PONG)
  2. Check your connection string has the correct host, port, and credentials
  3. Ensure your firewall allows connections to the Redis port (default: 6379)
  4. For remote Redis, verify network connectivity and credentials

Composer Errors

If you encounter Composer errors:
  1. Ensure you’re running PHP 8.1 or higher: php -v
  2. Update Composer: composer self-update
  3. Clear Composer cache: composer clear-cache
  4. Try running with verbose output: composer install -vvv

Missing Lua Scripts

If you get errors about missing Lua scripts when installing from GitHub:
  1. Ensure you have Node.js and Yarn installed
  2. Run the build commands from the monorepo root:

Development Setup

For contributing or development:

Next Steps

Usage Guide

Learn how to add jobs and manage queues