In order for you to Transfer CometChat From Development Environment To Production Environment for your Web Site.
Step 1:
Transfer Complete Folder of CometChat from 'Development' server to 'Production'. Keep the CometChat folder in the root directory on the production server.
Step 2:
Now Open 'Development' database and find all table starting with 'cometchat_' prefix and transfer it to 'Production' database.
Step 3:
Now open 'integration.php' file which is in a 'cometchat' folder.
Search for below line and make a respective Changes as per your Production database.
define('DB_SERVER', "localhost" );
define('DB_PORT', "3306" );
define('DB_USERNAME', "root" );
define('DB_PASSWORD', "password" );
define('DB_NAME', "databasename" );
Step 4:
Once Done Changes save file.
Step 5:
You have to set '$_COOKIE['cc_data']' on your site with your user id (Primary key of user Table).
Step 6:
Now in 'integration.php' search for function 'getUserID()'. And paste below code before '$userid = intval($userid);' line.
if (!empty($_COOKIE['userid'])) {
$userid = $_COOKIE['userid'];
}
Step 7:
Enter to your CometChat Admin panel and search for "Install CometChat" from the left menu.
Select your Docked Layout code and integrate it into your Site Footer/Header as per your requirement
Step 8:
For Activating your Embedded Layout. Create one page in your website and paste "Embedded Layout" Code on that page. Now Access that page from the Web browser.