Skip to main content

Posts

Showing posts with the label Queues

Laravel Queue Setup on Shared Hosting

Laravel Queue Setup on Shared Hosting Laravel queues allow you to defer time-consuming tasks like sending emails or processing uploads. But on shared hosting, there’s no supervisor tool like on VPS. Don’t worry — with cPanel and cron, you can still run queues efficiently. 🛠️ Prerequisites Laravel project already deployed on shared hosting (via cPanel) Queueable jobs created using php artisan make:job Basic understanding of Laravel's queue system ⚙️ Step 1: Configure Your Laravel Queue By default, Laravel uses the sync driver, which runs jobs immediately. Update the driver to database (or Redis, if supported): QUEUE_CONNECTION=database In your .env file, set the queue driver. If using database , run: php artisan queue:table && php artisan migrate This creates the necessary table for storing queued jobs. 📍 Step 2: Locate the Laravel Project Path Find your full La...