Email: [email protected]
Thank you for purchasing my script. If you have any questions that are beyond the scope of this help file, please feel free to email or ask from Skype. Thanks so much!
1) Upload "Server.php File"
First of all, open "server.php" and configure the required areas at the beginning. Then, upload the file to your server that has SSH access. You don't have to use the same server that you use wordpress.
2) Install the Plugin
Install the "websocket-live-chat.zip" plugin to wordpress.
During the installation an error might be occured while creating some folders. Please check the following paths, if the folders are exist and make sure their permissions are 777.
3) Configure Plugin Settings
It's successfully installed. Now go to settings on Wordpress's admin panel and configure the settings.
Please configure "WS Settings" page carefully. If something is wrong, the plugin may not work correctly.
4) Open Port for Websocket Listener
You need to open WebSocket Listener's port. Default value is 9000. This process depands on your server. If you do not know how to open a port, ask how to do to your service provider.
5) Start the WebSocket Listener
To make instant messaging work, you need to start WebSocket Listener on your server. First open a command line or connect to your server with SSH and type the command below.
php -q D:\xampp\htdocs\server.php
"D:\xampp\htdocs\server.php" is the destination of "server.php".
This command line must remain open in order to keep instant messaging working. However, if you connected to your server with SSH, the connection will be timed out. Do the step below.
If your server is Ubuntu (Most linux are the same) and you have cronmod, then you can use the command below to keep the process running.
First type "crontab -e" to your server's command line. Then add the code below.
@reboot (php -q /var/www/html/server.php &)
Then save it.
This will start the WebSocket listener on bootup.
Secure Connection (HTTPS & WSS)
Unfortunately, using HTTPS requires some configuration in the web service. First of all, you need "proxy_wstunnel_module". You can see the loaded modules by creating a php page. Add the code below to see loaded modules.
If "proxy_wstunnel_module" is not loaded, you need to install this module first.
Now, you need to configure "wstunnel.conf" file. Location of this file depands to your web service but I will give you the location for "httpd" and "apache2".
If "wstunnel.conf" file does not exist, create one.
To create and edit over SSH, type the following commant to your SSH.
sudo nano /LOCATION/wstunnel.conf
This command will open a text editor in SSH. Now, type the code below.
ProxyPass /wss ws://IP_OR_DOMAIN:PORT/server.php
Now, to save the file, click "ctrl + x" and type "y", then click "enter".
Now go to Admin Panel > Settings > General Settings and change "WebSocket Listener URL" with "IP_OR_DOMAIN/wss". Don't include the port and "server.php".
"wstunnel.conf" and "config.php" files should look like below.
Finally, restart your web service.