Installation Guide
Before beginning the installation make sure that your system requirements as indicated have been met.
Important Info From v2.4
- Ensure that you are using php v8.2
- Ensure that you have enabled
imagick
extension in your server (If not you might experience error 500). - Ensure that you are running either
MYSQL > 5.7.7
orMariaDB > 10.2.2
(Alternatively, you may enable the innodb_large_prefix option for your database)
After purchasing Swiftchats, you will get a zipped folder. After unzipping the folder, you will get three folders, the source code folder, update folder and the documentation folder.
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.
cPanel - MySQL database wizard
Plesk - Website databases
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)
Supervisor can only be setup in a VPS and not shared hosting. If using shared hosting go to the cron jobs section below.
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:
For CentOS/Rocky Linux:
After installation, start Supervisor and enable it to run on boot:
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).
Add the following content:
Replace /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:
To check if Supervisor is running correctly, use:
Step 4: Monitoring and Logs
You can check the logs if anything goes wrong:
If the queue worker stops unexpectedly, restart Supervisor:
Step 5: Ensure Supervisor Starts on Boot
To prevent queue workers from stopping after a reboot, enable Supervisor:
2. Server Cron Jobs
Cpanel
- Access your cPanel account using your credentials.
- Look for the
Cron Jobs
orCron Tasks
icon within the cPanel dashboard. It’s usually found under theAdvanced
orMetrics
section. - Click on the
Cron Jobs
icon to proceed. - Under the
Add New Cron Job
section, you’ll see fields to specify the timing and command for the cron job. - Set Timing: We suggest to run the cron job every 3-5 minutes.
- In the command field, enter the appropriate command to fetch the URL. For example:
OR
- 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:
*/3
meansevery 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