Title: Simple Ajax Chat – Add a Fast, Secure Chat Box
Author: Jeff Starr
Published: <strong>15 Tháng mười một, 2012</strong>
Last modified: 27 Tháng 3, 2026

---

Tìm kiếm plugin

![](https://ps.w.org/simple-ajax-chat/assets/banner-772x250.jpg?rev=1389630)

![](https://ps.w.org/simple-ajax-chat/assets/icon-256x256.png?rev=1473439)

# Simple Ajax Chat – Add a Fast, Secure Chat Box

 Bởi [Jeff Starr](https://profiles.wordpress.org/specialk/)

[Tải về](https://downloads.wordpress.org/plugin/simple-ajax-chat.20260301.zip)

 * [Chi tiết](https://vi.wordpress.org/plugins/simple-ajax-chat/#description)
 * [Đánh giá](https://vi.wordpress.org/plugins/simple-ajax-chat/#reviews)
 *  [Cài đặt](https://vi.wordpress.org/plugins/simple-ajax-chat/#installation)
 * [Nhà phát triển](https://vi.wordpress.org/plugins/simple-ajax-chat/#developers)

 [Hỗ trợ](https://wordpress.org/support/plugin/simple-ajax-chat/)

## Mô tả

> ⭐ Lightweight and fast, persistent chat solution!
> ⭐ Fully self-hosted: No 3rd-party account required 🙂

Simple Ajax Chat makes it easy for your visitors to chat with each other on your
website. Simply add a shortcode to any post or page and done! Instant chat forum
anywhere. The chat form is fully customizable with many options, so you can create
the perfect chat box for your visitors.

> 👉 Check out a [Live Demo of Simple Ajax Chat at WP-Mix »](https://wp-mix.com/chat/)
> 👉 [Pro version](https://plugin-planet.com/simple-ajax-chat-pro/) supports unlimited
> chat forms!

Simple Ajax Chat is fully self-hosted with NO 3rd-party service required. Many (
if not all) of the other free chat plugins require registration and monthly service
from a 3rd-party provider. With Simple Ajax Chat, there is no 3rd-party: WordPress
is all that’s required. Own your chats!

**Difference between SAC free and SAC Pro**

The **main** difference between SAC free and SAC Pro? Easy:

 * SAC free supports 1 chat form
 * SAC Pro supports unlimited chat forms

Pro can do everything free can do and SO much more. Customize each chat form with
unique features. SAC Pro is an all new plugin written with smarter, faster code 
and all the latest techniques. [Get SAC Pro »](https://plugin-planet.com/simple-ajax-chat-pro/)

**SAC Features**

 * The simplest possible _persistent_ chat
 * Fully self-hosted: No 3rd-party account required
 * Ajax goodness loads new chats without page refresh
 * Smart chat processing optimizes for performance
 * Works with all browsers (Chrome, Firefox, Safari, etc.)
 * Works with all mobile devices (iPhone, Android, etc.)
 * Display easily via shortcode or template tag
 * Display chat box in multiple locations
 * Regularly updated & “future proof”
 * Supports custom CSS styles
 * Strong anti-spam security
 * Clean HTML markup

**More Features**

 * Plug-&-play: no configuration required
 * Built-in control panel to edit and delete chats
 * Define your own list of banned words and phrases
 * Display chat messages in ascending or descending order
 * Display custom content before/after the chat form
 * Option to play sound alert for chat messages
 * Option to restrict chat to logged-in users
 * Option to restore default plugin settings
 * Option to enable browser notifications
 * Export all chat messages via CSV file
 * Supports emoticons and emojis 🙂

**Customize Everything**

 * Limit maximum number of chat messages
 * Limit maximum length of each chat message
 * Advanced customization via filter hooks
 * Option to use textarea for larger input field
 * Option to use logged-in username as the chat name
 * Option to enable/disable URL field for chat names
 * Load JavaScript only when chat box is displayed
 * Customize the update interval for Ajax requests
 * Customize the fade-in colors for new chats
 * Customize the fade-duration for new chats
 * Plus much more!

👉 That’s a LOT of features, but the Pro version has WAY more. [Compare features (free vs. pro) »](https://plugin-planet.com/simple-ajax-chat-pro/#free-vs-pro)

**Exclusive Pro Features**

 * Enable Google reCaptcha (invisible) for all chat forms
 * Choose from six form styles, or use custom styles
 * Advanced chat management tools and user statistics
 * Mute any user so they are not allowed to chat
 * Ban any non-admin users from any chat session
 * Enable customizable emoji picker for any chat form
 * Display user avatars next to chat messages
 * Display the user role next to chat messages
 * Define your own Bang (!bang) shortcuts
 * Email notifications for new chat messages
 * Limit number of users for any chat form
 * Create private chat boxes between users
 * Banned phrases in text messages and user names
 * Fine-grain control over allowed chat content
 * Built with vanilla JavaScript (jQuery not required)
 * Optionally display inline images in chat messages
 * Automatically clear chat messages and send email alert
 * Display a “current online users” widget for any form
 * Displays a max-character counter for messages
 * Display a role-based chat box on the WP Dashboard
 * Choose from six sound alerts for new chat messages
 * Option to include your own CSS and JavaScript

👉 Learn more and [get SAC Pro »](https://plugin-planet.com/simple-ajax-chat-pro/)

**Privacy**

This plugin collects voluntary user chat data (i.e., Name, Chat Message, and optional
URL field). It also gives the administrator the option to collect or not collect
user IP information. Aside from those two things, this plugin does not collect or
store any user data. This plugin uses a few cookies for the chat functionality. 
It does not connect to any third-party locations. Minimal impact on privacy.

**Translations**

This plugin supports [translation into any language »](https://translate.wordpress.org/projects/wp-plugins/simple-ajax-chat)

**Developer**

Simple Ajax Chat is developed and maintained by [Jeff Starr](https://x.com/perishable),
15-year [WordPress developer](https://plugin-planet.com/) and [book author](https://books.perishablepress.com/).

**Support development**

I develop and maintain this free plugin with love for the WordPress community. To
show support, you can [make a donation](https://monzillamedia.com/donate.html) or
purchase one of my books:

 * [The Tao of WordPress](https://wp-tao.com/)
 * [Digging into WordPress](https://digwp.com/)
 * [.htaccess made easy](https://htaccessbook.com/)
 * [WordPress Themes In Depth](https://wp-tao.com/wordpress-themes-book/)
 * [Wizard’s SQL Recipes for WordPress](https://books.perishablepress.com/downloads/wizards-collection-sql-recipes-wordpress/)

And/or purchase one of my premium WordPress plugins:

 * [BBQ Pro](https://plugin-planet.com/bbq-pro/) – Blazing fast WordPress firewall
 * [Blackhole Pro](https://plugin-planet.com/blackhole-pro/) – Automatically block
   bad bots
 * [Banhammer Pro](https://plugin-planet.com/banhammer-pro/) – Monitor traffic and
   ban the bad guys
 * [GA Google Analytics Pro](https://plugin-planet.com/ga-google-analytics-pro/)–
   Connect WordPress to Google Analytics
 * [Head Meta Pro](https://plugin-planet.com/head-meta-pro/) – Ultimate Meta Tags
   for WordPress
 * [Simple Ajax Chat Pro](https://plugin-planet.com/simple-ajax-chat-pro/) – Unlimited
   chat rooms
 * [USP Pro](https://plugin-planet.com/usp-pro/) – Unlimited front-end forms

Links, tweets and likes also appreciated. Thank you! 🙂

## Ảnh màn hình

 * [[
 * Simple Ajax Chat: Chat Box
 * [[
 * Simple Ajax Chat: Plugin Settings (panels toggle open/closed)

## Cài đặt

**Installation**

 1. Upload the plugin to your blog and activate
 2. Visit the settings to configure your options

[More info on installing WP plugins](https://wordpress.org/documentation/article/manage-plugins/#installing-plugins-1)

**Usage**

Once the settings are configured, you can display the form anywhere using the shortcode
or template tag.

**Shortcode**

Use this shortcode to display the chat box on a post or page:

    ```
    [sac_happens]
    ```

**Template Tag**

Use this template tag to display the chat box anywhere in your theme template:

    ```
    <?php if (function_exists('simple_ajax_chat')) simple_ajax_chat(); ?>
    ```

**More chat forms and features**

The free version of SAC supports one chat form that can be displayed anywhere. The
[Pro version](https://plugin-planet.com/simple-ajax-chat-pro/) supports unlimited
chat forms and great features like Google reCaptcha, private chats, mute/ban users,
and much more.

**Stopping spam**

This plugin works in two modes:

 * “Open Air” mode – anyone can chat
 * “Private” mode – only logged-in users can chat

“Private” mode stops all automated spam, but registered users may still send “spammy”
chat messages. Likewise, the “Open Air” mode is super effective at blocking automated
spam, but some manual spam may get through. As a general rule, the longer your chat
forum is online, the more of a target it will be for spam.

Alternately/additionally you can [use .htaccess to block spammers](https://wp-mix.com/htaccess-block-spammer/).
It’s an easy, super-effective method for controlling access to your site. Also note
that the [Pro version](https://plugin-planet.com/simple-ajax-chat-pro/) provides
built-in support for Google reCaptcha, which is very effective at stopping spam.

**Browser Notifications**

SAC provides optional browser notifications. When enabled in the plugin settings,
all of the notification stuff happens automatically, depending on your browser settings.
For example, if your browser is set to deny all site notifications, then you won’t
see any SAC notifications. Likewise, if your browser is configured to allow notifications(
and they are enabled in the settings), then you will see the notifications display
whenever you are visiting the chat box and someone leaves a message. For more infos,
check out the documentation for your specific browser.

**Other Notes**

Some additional notes just FYI:

 * The chat markup includes `sac-online` class for online users
 * Includes template of all CSS hooks (located @ `/resources/sac.css`)
 * Timestamp for each chat message included in chat markup

**Like the plugin?**

If you like Simple Ajax Chat, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/simple-ajax-chat/reviews/?rate=5#new-post).
It helps to keep development and support going strong. Thank you!

**Upgrades**

Visit the WordPress Plugins screen, locate the plugin, and click “Update” 🙂

**Restore Default Options**

To restore default plugin options, either uninstall/reinstall the plugin, or visit
the plugin settings > Restore Default Options.

**Uninstalling**

This plugin cleans up after itself. All plugin settings and chat messages will be
removed from the WordPress database when the plugin is deleted via the WP Plugins
screen. Note: if you want to keep a copy of your chat messages, visit the plugin
settings and export them as a CSV file.

## Hỏi đáp

### How do I change the alert sound?

Open the directory `/resources/audio/` and replace the files `msg.mp3` and `msg.
ogg` with your desired audio files. You will notice lots of alternate sound files
included in that same directory. Simply rename any pair of files to replace the 
defaults.

### Where can I find a complete list of CSS selectors?

Check out `sac.css` located in the `resources` directory.

### Can we auto-delete chat messages on a set time interval?

Yes, please see this post at WP-Mix.com: [Auto-Clear Chats](https://wp-mix.com/simple-ajax-chat-auto-clear-chats/).

### Does it work with mobile devices?

Yep, the chat plugin works great on iPhones, Android devices, and just about anything
that supports JavaScript.. the functionality is achieved using Ajax.

### Is it possible to whitelist SAC plugin files?

Yes, check out [Simple Ajax Chat .htaccess whitelist](https://wp-mix.com/simple-ajax-chat-htaccess-whitelist/)
and/or [Whitelist POST access with .htaccess](https://wp-mix.com/whitelist-post-access-htaccess/)

### How do I hide “Latest Message: X minutes ago”?

Add this CSS:

    ```
    #sac-latest-message { display: none; }
    ```

You can add that to the plugin setting, “Custom CSS styles” or your theme styles,
wherever. If adding via the plugin setting, make sure that the associated setting,“
Enable custom styles” also is enabled.

### How do I hide the Name, URL, etc. labels on the form?

Add this CSS:

    ```
    #sac-form label { display: none; }
    ```

You can add that to the plugin setting, “Custom CSS styles” or your theme styles,
wherever. If adding via the plugin setting, make sure that the associated setting,“
Enable custom styles” also is enabled.

### How to remove the “say it” button?

You can hide the “say it” submit button, so the user must press enter to submit 
chats. Add this CSS:

    ```
    #sac-user-submit { display: none; }
    ```

You can add that to the plugin setting, “Custom CSS styles” or your theme styles,
wherever. If adding via the plugin setting, make sure that the associated setting,“
Enable custom styles” also is enabled.

### The form is not displaying correctly, looks all messed up?

Simple Ajax Chat is designed to look great on any of the default WP themes and most
other themes as well. Even so, every theme is different, and it’s impossible to 
test on the hundreds of thousands of themes that are available. So if the chat form
is not looking awesome on your theme, it’s because your theme for whatever reason
is applying its own particular styles. If this is the case, you can try disabling
the plugin setting to “Enable custom styles”. If that doesn’t help, you can include
your own custom CSS, or customize the plugin’s default styles. Alternately, you 
may include custom CSS via your theme’s stylesheet, and/or modify your theme’s CSS
as needed to make things display as desired. Tip: to see how the chat form _should_
look, check it out using any of the default WP themes.

### The chat form is visible but new chats are not displayed?

If this is happening, and/or if you are receiving a “Failed opening required” error
message, most likely your site’s `wp-load.php` file is not located in the usual 
default location (i.e., it has been moved to a custom location). If this is the 
case, you will need to edit the paths in `/simple-ajax-chat-core.php` (line 4) and`/
resources/sac.php` (line 10). At some point I will be revamping the plugin so that
this modification won’t be necessary.

### How do I fix weird characters displayed in the chat box?

If you are seeing question marks or other weird characters or symbols in chat messages,
you can try one of the following solutions:

 * Uninstall (delete) the plugin, and then re-install. Note that this technique 
   resets all settings and deletes all chat messages.
 * Or, if you don’t want to lose any settings or chat messages, you can run the 
   following SQL command: `ALTER TABLE wp_ajax_chat CONVERT TO CHARACTER SET utf8
   COLLATE utf8_general_ci;`

Either of these techniques should resolve any weird character issues. Note that 
the SQL command assumes you are using the default database prefix, `wp_`. So make
sure to edit that part of the command if you are using a custom database prefix.

### How do I customize the login-required message?

By default, the login-required message is “You must be a registered user to participate
in this chat.” To customize this message, check out [this forum post](https://wordpress.org/support/topic/better-integration-with-buddypress/#post-9368504).

### Chat Box not working in certain browsers (e.g., Chrome)?

Certain plugins (e.g., Shield Security) may implement security headers that prevent
SAC from working properly. To resolve this issue, visit the “HTTP Headers” tab and
go to “Security Headers tab” (or similar depending on which plugin you are using).
There you can set the “Referrer Policy” to “Same Origin” and then save changes. 
SAC immediately should start working properly, but you also may need to clear the
browser cache and hard reload the page.

### How to translate form inputs?

If the form inputs like “Submit” button are not showing translation. You can work
around by adding the following jQuery snippet:

    ```
    <script>jQuery(function() { jQuery('#submitchat').val('Whatever'); });</script>
    ```

That needs to be included in your theme **after** jQuery is loaded. Then change `#
submitchat` to the ID of the form input. Change `Whatever` to whatever you want 
to display for the text.

### How to show the date/time of each chat?

Add the following CSS to the plugin setting, “Custom CSS styles”:

    ```
    ul#sac-messages li.sac-chat-message::before { content: "[ 'attr(data-time)' ]"; color: #777; }
    ```

After saving changes, that CSS will display the chat date/time next to each message,
for example:

[ 2021-08-30,08:35:57 ] Chat User: Hello this is a chat message left in August of
2021.

### How to display chat box and form in vertical fashion?

By default, the chat box and form are displayed side by side. Here is a quick [tutorial](https://wp-mix.com/responsive-css-for-simple-ajax-chat/)
to display them vertically, so the chat form is below the chat box. This is useful
for optimizing SAC for limited space on the page.

### Got a question?

Send any questions or feedback via my [contact form](https://plugin-planet.com/support/#contact)

## Đánh giá

![](https://secure.gravatar.com/avatar/7774d8c46812b34fbff3e29990ed71084965fd2e7cdf8fe41e97de41ca20d872?
s=60&d=retro&r=g)

### 󠀁[VERSIÓN GRATUITA](https://wordpress.org/support/topic/version-gratuita-2/)󠁿

 [todoporjesus](https://profiles.wordpress.org/todoporjesus/) 16 Tháng 3, 2026

Excelente herramienta! Lo estoy usando en la web de la Iglesia.

![](https://secure.gravatar.com/avatar/10368089c602ba57dad3a0480f643dfd228a7ff4a437bb79c199ba6ecf26be26?
s=60&d=retro&r=g)

### 󠀁[Super simple](https://wordpress.org/support/topic/super-simple-95/)󠁿

 [mobone](https://profiles.wordpress.org/mobone/) 23 Tháng mười một, 2025

Super simple

![](https://secure.gravatar.com/avatar/5d2a97b21fdbb584cb237986a8faed88db9834087c8a2921eaabcb06c2181053?
s=60&d=retro&r=g)

### 󠀁[Wonderfull](https://wordpress.org/support/topic/wonderfull-140/)󠁿

 [Thomas](https://profiles.wordpress.org/thofied/) 16 Tháng 6, 2025

Works good.

![](https://secure.gravatar.com/avatar/f9d040b792f54e2eb606268732af1c9eb79a79557611d736c17555183b2f2a55?
s=60&d=retro&r=g)

### 󠀁[Simple Ajax Chat: The Perfect Real-Time Chat Solution](https://wordpress.org/support/topic/simple-ajax-chat-the-perfect-real-time-chat-solution/)󠁿

 [César Ramos](https://profiles.wordpress.org/cesarramos/) 18 Tháng 1, 2025

Simple Ajax Chat is a fantastic plugin that brings real-time chat functionality 
to any WordPress site with minimal setup. Its ease of use and seamless integration
make it an excellent choice for creating engaging chat environments for communities.

![](https://secure.gravatar.com/avatar/329bb45f08785c2a516dee73ac02f4a578cfaebffa09048b85c088c673a6eab8?
s=60&d=retro&r=g)

### 󠀁[Awesome! Simple & User Friendly and Intuitive.](https://wordpress.org/support/topic/awesome-simple-user-friendly-and-intuitive/)󠁿

 [wordmax](https://profiles.wordpress.org/wordmax/) 17 Tháng 12, 2024

Super easy to install via shortcode. Tweak a few settings and you’re off to the 
races. Copy and paste shortcode anywhere you want it to show, easy to make it into
a pattern reusable block.

![](https://secure.gravatar.com/avatar/6504c50955101e898b816cf95a91f5e87dc5f34fde2591856f40787df87b3651?
s=60&d=retro&r=g)

### 󠀁[refreshing!](https://wordpress.org/support/topic/refreshing-5/)󠁿

 [lbdesign](https://profiles.wordpress.org/lbdesign/) 26 Tháng mười một, 2024

Simple, clean, performant, works great. I love it. In fact, I just upgraded to Pro.

 [ Đọc tất cả 213 đánh giá ](https://wordpress.org/support/plugin/simple-ajax-chat/reviews/)

## Người đóng góp & Lập trình viên

“Simple Ajax Chat – Add a Fast, Secure Chat Box” là mã nguồn mở. Những người sau
đã đóng góp vào plugin này.

Những người đóng góp

 *   [ Jeff Starr ](https://profiles.wordpress.org/specialk/)

“Simple Ajax Chat – Add a Fast, Secure Chat Box” đã được dịch qua 9 ngôn ngữ. Cảm
ơn [những người tham gia dịch](https://translate.wordpress.org/projects/wp-plugins/simple-ajax-chat/contributors)
vì đóng góp của họ.

[Dịch “Simple Ajax Chat – Add a Fast, Secure Chat Box” sang ngôn ngữ của bạn.](https://translate.wordpress.org/projects/wp-plugins/simple-ajax-chat)

### Muốn tham gia phát triển?

[Duyệt code](https://plugins.trac.wordpress.org/browser/simple-ajax-chat/), check
out [SVN repository](https://plugins.svn.wordpress.org/simple-ajax-chat/), hoặc 
theo dõi [nhật ký phát triển](https://plugins.trac.wordpress.org/log/simple-ajax-chat/)
qua [RSS](https://plugins.trac.wordpress.org/log/simple-ajax-chat/?limit=100&mode=stop_on_copy&format=rss).

## Nhật ký thay đổi

If you like Simple Ajax Chat, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/simple-ajax-chat/reviews/?rate=5#new-post).
It helps to keep development and support going strong. Thank you!

> 👉 [Pro version](https://plugin-planet.com/simple-ajax-chat-pro/) supports unlimited
> chats, user blocking/muting, advanced chat management, emojis, and much more!

**20260301**

 * Fixes bug with chat messages appearing as links
 * Tests on WordPress 6.9 + 7.0 (beta)

Full changelog @ [https://plugin-planet.com/wp/changelog/simple-ajax-chat.txt](https://plugin-planet.com/wp/changelog/simple-ajax-chat.txt)

## Meta

 *  Phiên bản **20260301**
 *  Cập nhật lần cuối **3 tuần trước**
 *  Số lượt cài đặt **2.000+**
 *  Phiên bản WordPress ** 4.7 hoặc cao hơn **
 *  Đã kiểm tra lên đến **7.0**
 *  Phiên bản PHP ** 5.6.20 hoặc cao hơn **
 *  Ngôn ngữ
 * [Dutch](https://nl.wordpress.org/plugins/simple-ajax-chat/), [English (US)](https://wordpress.org/plugins/simple-ajax-chat/),
   [French (France)](https://fr.wordpress.org/plugins/simple-ajax-chat/), [Greek](https://el.wordpress.org/plugins/simple-ajax-chat/),
   [Korean](https://ko.wordpress.org/plugins/simple-ajax-chat/), [Spanish (Chile)](https://cl.wordpress.org/plugins/simple-ajax-chat/),
   [Spanish (Colombia)](https://es-co.wordpress.org/plugins/simple-ajax-chat/), 
   [Spanish (Ecuador)](https://es-ec.wordpress.org/plugins/simple-ajax-chat/), [Spanish (Spain)](https://es.wordpress.org/plugins/simple-ajax-chat/),
   và [Spanish (Venezuela)](https://ve.wordpress.org/plugins/simple-ajax-chat/).
 *  [Dịch sang ngôn ngữ của bạn](https://translate.wordpress.org/projects/wp-plugins/simple-ajax-chat)
 * Thẻ
 * [ajax](https://vi.wordpress.org/plugins/tags/ajax/)[chat](https://vi.wordpress.org/plugins/tags/chat/)
   [chat box](https://vi.wordpress.org/plugins/tags/chat-box/)[forum](https://vi.wordpress.org/plugins/tags/forum/)
   [instant message](https://vi.wordpress.org/plugins/tags/instant-message/)
 *  [Nâng cao](https://vi.wordpress.org/plugins/simple-ajax-chat/advanced/)

## Đánh giá

 4.9 trên 5 sao.

 *  [  199 5-star reviews     ](https://wordpress.org/support/plugin/simple-ajax-chat/reviews/?filter=5)
 *  [  6 4-star reviews     ](https://wordpress.org/support/plugin/simple-ajax-chat/reviews/?filter=4)
 *  [  3 3-star reviews     ](https://wordpress.org/support/plugin/simple-ajax-chat/reviews/?filter=3)
 *  [  2 2-star reviews     ](https://wordpress.org/support/plugin/simple-ajax-chat/reviews/?filter=2)
 *  [  3 1-star reviews     ](https://wordpress.org/support/plugin/simple-ajax-chat/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/simple-ajax-chat/reviews/#new-post)

[Xem tất cả đánh giá](https://wordpress.org/support/plugin/simple-ajax-chat/reviews/)

## Những người đóng góp

 *   [ Jeff Starr ](https://profiles.wordpress.org/specialk/)

## Hỗ trợ

Các lỗi đã xử lý trong vòng hai tháng gần đây:

     1 trên 1

 [Xem diễn đàn hỗ trợ](https://wordpress.org/support/plugin/simple-ajax-chat/)

## Ủng hộ

Bạn có muốn hỗ trợ vào sự phát triển của plugin này?

 [ Ủng hộ plugin này ](https://monzillamedia.com/donate.html)