Yes, Laravel queues work on shared hosting, but not the way they work on a VPS. You cannot run a long-lived worker with Supervisor, so the working setup is the database queue driver plus a cron job that runs short queue:work bursts every minute or two.
That one sentence saves most people hours of confusion. Shared hosting is built for requests that start and finish quickly. A queue worker is the opposite: a process that sits in the background, waiting for work. Most shared hosts will not let you run that process at all, or they will kill it the moment it has been alive for a few minutes. So the trick is not to fight the host. It is to shape the queue work into small pieces the host will tolerate.
We have set this up for plenty of buyers running Laravel scripts on cPanel, and the pattern below is the one that keeps working. It is not elegant, and it is not fast, but it is honest about what a shared account can do.
Why do queues behave differently on shared hosting?
On a VPS, you install Supervisor, point it at php artisan queue:work, and the worker runs forever. It wakes up the instant a job is pushed, processes it, and waits for the next one. Shared hosting gives you none of that. You usually get no root access, no Supervisor, no systemd, and often no Redis. Your PHP processes are started by the web server and killed when the request ends.
That means the two normal queue tools are missing. There is no daemon manager to keep a worker alive, and there is no fast in-memory queue. What you do get, on almost every cPanel host, is cron and a MySQL database. Those two things are enough, if you accept the delay that comes with them.
The delay is the key point to understand before you start. A cron-driven queue only checks for new jobs when cron runs. If cron runs every minute, a job can wait up to a minute before it starts. For a password reset email or an invoice PDF, that delay is invisible. For a chat message that must appear instantly, it is a deal-breaker. Know which kind of job you have before you choose the setup.
What queue drivers actually work on shared hosting?
There are four drivers you will hear about, and only two of them belong on a shared account.
| Driver | Works on shared hosting? | What you need | When to use it |
|---|---|---|---|
| database | Yes, the reliable choice | MySQL and the jobs table | Almost every shared-hosting install |
| sync | Yes, but it is not a real queue | Nothing extra | Development only, or tiny one-off jobs |
| redis | Usually no | A Redis server, which shared hosts rarely provide | VPS or a managed Redis service |
| beanstalkd / sqs | Usually no | A separate service or daemon | VPS or cloud setups |
The database driver is the right default on shared hosting. Jobs sit in a MySQL table, the worker picks them up, and a failed job lands in the failed_jobs table where you can see it. It is slower than Redis and it adds load to your database, but on a small or medium site that load is small, and the setup is something any cPanel user can do.
The sync driver is a trap for beginners. It runs the job immediately, inside the web request, so it looks like queues are working. In reality nothing is queued at all. A slow job makes the page hang, and a failed job shows the user an error instead of retrying quietly. Use sync only while developing. If your .env says QUEUE_CONNECTION=sync on a live site, your queues are not running.
Can you run a queue worker without Supervisor?
Yes, and this is the part most tutorials skip because they assume a VPS. On shared hosting, the replacement for Supervisor is cron. You tell cron to run a short-lived worker on a schedule, and each run processes whatever jobs are waiting, then exits before the host gets annoyed.
The command looks like this, run from your Laravel project folder:
php artisan queue:work --stop-when-empty
The --stop-when-empty flag is the whole trick. Without it, queue:work keeps running forever, waiting for more jobs, and the host will kill it — or worse, your cron runs stack up into dozens of workers fighting over the same jobs. With the flag, each cron run processes the waiting jobs and exits cleanly. One minute later, cron starts a fresh worker.
There are two limits to respect. First, keep the worker short. Add --max-time=50 so a run never lasts longer than about a minute, which keeps it inside the time a shared host allows a cron command to run. Second, do not run two workers at once. If your cron interval is one minute and a run takes two, the runs overlap. Use --without-overlapping if your scheduler supports it, or keep the interval a little longer than the slowest expected run.
How do you set up a cron-driven queue on cPanel?
Open the Cron Jobs tool in cPanel and add a job that runs every minute. The exact path depends on your install, but the shape is always the same:
cd /home/username/public_html && php artisan queue:work --stop-when-empty --max-time=50 >> /dev/null 2>&1
Before you save it, do these checks in order, because each one catches a different common failure:
- Confirm the queue connection in your .env is
QUEUE_CONNECTION=database, not sync or redis. - Run the queue migrations so the jobs and failed_jobs tables exist:
php artisan queue:tablethenphp artisan migrate. - Run the worker command once by hand over SSH, or through cPanel's terminal, and watch it finish without an error.
- Push a test job — a password reset email is a good one — and check the jobs table empties within a minute or two.
- Check the failed_jobs table after your first real traffic. An empty table means jobs are running; a growing table means something is failing silently.
One detail catches a lot of people: the PHP binary in cron is not always the PHP version your site uses. cPanel may have several versions installed, and php on the command line can point at an old one. If the worker dies with a syntax error your site does not have, run it with the full path to the right version, for example /usr/local/bin/php82 — check your host's docs for the exact path. Our PHP 8.2 and 8.3 hosting checklist covers how to confirm which version is actually running.
What breaks most often, and how do you fix it?
Most queue failures on shared hosting come from a short list, and they are all diagnosable without touching the code.
Jobs pile up and never run. The cron job is not firing, or it is failing before the worker starts. Check the cron email output, or add logging to a file instead of sending output to /dev/null while you debug. A wrong path to the project folder is the usual cause.
Jobs fail immediately. Look in failed_jobs and read the exception column. The most common causes are a missing .env value the job needs, an email configuration error, or a class the job references that was renamed. Fix the cause, then retry the failed job with php artisan queue:retry all.
The worker dies after a few minutes. The host is killing long-running processes. Shorten the run with --max-time=50 and make sure --stop-when-empty is set. If the host kills processes after 30 seconds, shorten the max time further and run cron every minute.
Memory errors. A worker that processes many jobs in one run slowly grows in memory, and shared hosts set low limits. Add --memory=128 to cap it, and keep individual jobs small. If one job needs to generate a huge report, split it into smaller jobs.
The same job runs twice. Two workers overlapped, or the job took longer than its retry window and Laravel assumed it had died. Keep runs non-overlapping and set a sensible retry_after value in config/queue.php — longer than your slowest job takes.
If the problem looks like an installation issue rather than a queue issue, our guide to 9 common errors after installing a Laravel script covers the usual suspects, from file permissions to the .env file itself.
Database queue or sync: which should you choose?
Use the database driver for anything real. Sync is fine on your laptop and nowhere else. The reason is not performance; it is what happens when something goes wrong. A queued job that fails gets retried, logged in failed_jobs, and can be inspected later. A sync job that fails blows up in the user's face, mid-request, with no record anywhere except the error log.
That said, the database driver is not free. Every job is a few database queries, and a busy site with thousands of small jobs an hour will feel it. At that point the honest answer is that you have outgrown shared hosting, not that the driver is wrong. For the sites most people run on a shared account — a school system sending fee reminders, a shop sending order emails — the database driver will handle the load without complaint.
When does shared hosting stop being enough for queues?
Three signs tell you it is time to move to a VPS. First, your jobs need to start within seconds, not within a minute — real-time chat, live notifications, or anything a user is staring at while they wait. Second, you are pushing so many jobs that cron cannot clear the backlog between runs, and the jobs table keeps growing through the day. Third, you need Redis, Horizon, or a worker that stays alive for hours.
Until then, the cron-and-database setup is a perfectly respectable way to run queues. It is how a lot of small businesses run their Laravel products, and it works because it respects what the host can actually do instead of pretending the host is a VPS.
If you are choosing a script to run this way, look at the full catalogue — every product ships with full unencrypted source code, an installation guide and lifetime free updates, so you can see exactly how its queues and jobs are set up before you buy. And if you get stuck on the setup, our support is a real human on WhatsApp at +92 333 4916432, or by email at contact@zqdevelopers.com. Check the licence terms too, so you know whether the Standard or Extended licence matches how you plan to use the product.