WhatsMail

Towards the #1 Marketing Tool

Install on Cpanel

Note!

Before purchasing hosting, make sure to ask two things: first, about node server installation, as not all hosting services provide this. Second, inquire about Cronjob support for automatically restarting the node server if it stops due to a server reboot.

1. Upload File whatsmail-main.zip

Upload the whatsmail-main.zip file to the File Manager at the domain path or folder where your domain is directed.

Note!

Do not place the source files directly in the public_html directory without any folder. Instead, point your domain to another path or within a folder in public_html. This is because some hosting providers restrict running node servers if the script is located in this directory.

Extract the zip file you just uploaded until it looks like the image below.

2. Create a Database

Follow these steps to create a database in your Cpanel:

  1. Create a New Database

  2. Create a New Database Username

  3. w
  4. Link the Newly Created Database and Username

  5. Grant Full Access or Set Permissions as Needed

3. Run the Installation

Open the domain or URL where the script was uploaded, then run the script installation. The Web Installation section will guide you through the application installation process.

4. Run the Node Server

Follow these steps to run the node server on Cpanel:

  1. Add the Code and Configuration to the .env File
    
                  WHATSAPP_SERVER_URL='http://127.0.0.1:43123'
                  WHATSAPP_HOST="127.0.0.1"
                  WHATSAPP_PORT=43123
                  RECONNECT_INTERVAL=5000
                  MAX_RETRIES=5
                        

    Pay attention to port 43123. You need to ask which port can be used and ensure that it does not conflict with other users. It's recommended to use ports above 40000 with a random number to avoid clashes.

  2. Go to the Node Server Manager in Cpanel, and click on Create Application

  3. Fill in the details as follows, make sure everything is set, then click Create

  4. Once the node application is running, click Run JS Script to start the node server

5. Run the CronJob

Go to the Cronjob page in your Cpanel, then enter the following code:

/usr/local/bin/php /home/public_html/yourdomain.com/artisan schedule:run >> /dev/null 2>&1

Replace yourdomain.com with your domain folder path. Refer to the image below for guidance: