Before beginning the installation make sure that your system requirements as indicated have been met.
Documentation
Source-code
Update
Database setup
- Create a new MySQL database.
- Create a new MySQL username and password.
- Assign full privileges to your database username.
Uploading code
Before starting to upload the files, please make sure your file explorer has the option to view hidden files turned on. On some operating systems, the dotfiles are hidden by default.
- Upload the source-code folder to your server public_html or domain root directory where Swiftchats will be installed.
- Create a new MySQL database and DB user from your server and assign that user to the database
Installer setup
Once you have configured the steps above, go to your domain or subdomain which should redirect you to the installation page. Go through each installation step and grant folder permissions where necessary.Laravel jobs and queues
To ensure successful delivery of WhatsApp campaigns, it’s essential to set up a cron job or queue system that runs at scheduled intervals to dispatch campaigns efficiently. There are multiple ways to configure this, and in this documentation, we’ll outline the recommended approaches. Generally there are 3 ways for running cron jobs:- Supervisor for queue management - Best suited for VPS or dedicated hosting (Highly recommended)
- Server cron jobs - Preferred for shared hosting environments.
- cronjob.org - An alternative for shared hosting when direct server cron jobs are unavailable.
1. Supervisor (Highly Recommended)
If you decide to use laravel queues go to your .env file and change the following:Step 1: Install Supervisor
First, install Supervisor on your VPS. The installation command depends on your operating system: For Ubuntu/Debian:Step 2: Create a Supervisor Configuration File for Laravel Queues
Create a new configuration file inside/etc/supervisor/conf.d/ (for Ubuntu) or /etc/supervisord.d/ (for CentOS).
/path-to-your-project/ with your actual Laravel project path.
Step 3: Apply Supervisor Changes
After creating the configuration file, run the following commands to update and start Supervisor:Step 4: Monitoring and Logs
You can check the logs if anything goes wrong:Step 5: Ensure Supervisor Starts on Boot
To prevent queue workers from stopping after a reboot, enable Supervisor:Step 6: Add a cron job for laravel scheduler
Edit the crontab:/path-to-your-project/ with your actual Laravel project path.
2. Server Cron Jobs
Cpanel
- Access your cPanel account using your credentials.
- Look for the
Cron JobsorCron Tasksicon within the cPanel dashboard. It’s usually found under theAdvancedorMetricssection. - Click on the
Cron Jobsicon to proceed. - Under the
Add New Cron Jobsection, you’ll see fields to specify the timing and command for the cron job. - Set Timing: We suggest to run the cron job every minute.
- In the command field, enter the appropriate command to fetch the URL. For example:
- Save Cron Job
Linux/VPS
-
Open your crontab for editing. You can do this by running the following command in your terminal:
crontab -e -
Add the following line to your crontab to execute the URL every 3 minutes:
Here’s a breakdown of the cron schedule:*/3meansevery 3 minutes.*in the other fields means “every hour,” “every day,” “every month,” and “every day of the week.”
- Save and exit your crontab editor.
3. Cronjob.org
- Create an account on https://console.cron-job.org/
- Click on create cronjob on the dashboard
- Enter the URL of the cron job i.e. https://yoururl.com/campaign-send and set execution schedule between 3 - 5 minutes.
- Click create to save the cronjob
Trouble-shooting your installation
If you are facing issues with the installer, you can try the steps below- Grant access to your .env file by running the following code in the terminal.
- Go to storage folder and delete installed file
- Retry installing the script again
