Installation Guide
Before beginning the installation make sure that your system requirements as indicated have been met.
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.
Cron jobs setup
To ensure WhatsApp campaigns are successfully delivered, it’s vital to establish a cron job that runs at intervals to dispatch these campaigns. There are several ways to run the cron job. For the purposes of this documentation, we’ll highlight adding a cron job in cpanel, linux/VPS server and cronjob.org
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:
wget -O /dev/null https://yoururl.com/campaign-send
curl -sS https://yoururl.com/campaign-send >/dev/null 2>&1
- 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:
*/3 * * * * /usr/bin/curl -sS "https://yoururl.com/campaign-send"
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.
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.
chown -R www-data:www-data .env
- Go to storage folder and delete installed file
- Retry installing the script again