Get Live User Interaction on Your BuddyPress Site With Ajax Chat

Get Live User Interaction on Your BuddyPress Site With Ajax Chat

Ajax chat is an impressive feature that will get your users interacting on a live basis and keep them coming back for more. Installing Ajax Chat for BuddyPress might be a bit intimidating since it involves several extra steps, unlike most BuddyPress plugins. I’m going to simplify the process for you so that you can get ajax chat up and running quickly and efficiently for your users.


1. Download the plugin from the repository.

Attempting to install through the dashboard will put the directory in the wrong place.

2. Unpack the plugin and upload the /bp-chat directory to your plugins folder.
Do not activate it yet. It must be configured before activation.

3. Configure the plugin by editing the config.php file.

Locate the file at wp-content/plugins/bp-chat/chat/lib/config.php and configure the following 4 variables:

{code type=php}$config[‘dbConnection’][‘host’] = ‘your_chat_database_hostname’;
$config[‘dbConnection’][‘user’] = ‘your_chat_database_username’;
$config[‘dbConnection’][‘pass’] = ‘your_chat_database_password’;
$config[‘dbConnection’][‘name’] = ‘your_chat_database_name’;{/code}

Additional Languages: If you want configure chat for languages other than English, scroll down further and update the default language section. This example is for French:

{code type=php}$config[‘langDefault’] = ‘fr’;{/code}

Note: Ordinarily you won’t have to do any more configurations beyond this point. However, if you get errors you will have to follow optional Step 3.

3. Optional: In the event that your host does not use mysqli you will need to change the connection type field:

{code type=php}$config[‘dbConnection’][‘type’] = null;{/code}

4. Create the database tables by executing the installation script:

Navigate to:

5. Delete the installation script.

Delete the file install.php from the /wp-content/plugins/bp-chat/chat/ directory on your server.

6. You will need to configure the following parameters for custom low level database access:

Locate: /wp-content/plugins/bp-chat/chat/lib/class/CustomAJAXChat.php

{code type=php}$this->bp_config[‘username’] = “database_user_name”;
$this->bp_config[‘password’] = “database_password”;
$this->bp_config[‘database’] = “database_name”;
$this->bp_config[‘bp_group_table’] = “wp_bp_groups”; // normally do not change
$this->bp_config[‘wp_users_table’] = “wp_users”; // normally do not change
$this->bp_config[‘bp_groups_members’] = “wp_bp_groups_members”; // normally do not change
$this->bp_config[‘db’] = “”; // put your site domain name{/code}

7. Last step is to finally Activate the plugin.

Congratulations! You’ve successfully installed ajax chat for your users!


You can remove the adsense code by donating $5 to the plugin developer here: Buddypress Ajax Chat No Adsense