Admin User Chat
A lightweight WordPress plugin that enables private one-on-one chat between logged-in users and the site admin. Built with jQuery and AJAX, and integrated into both front-end and WordPress admin dashboard.
by Thimira Perera · github.com/thimiraperera/admin-user-chat
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/thimiraperera/admin-user-chat/archive/refs/heads/main.zipWordPress Admin-User Chat Plugin
A secure and efficient chat system that enables direct communication between administrators and registered users within WordPress.
Features
- 💬 Real-time Messaging
Admin-to-user and user-to-admin chat functionality - 🔔 Email Notifications
Configurable email alerts for unread messages - 📤 Chat Export
Export full conversation history as text files - 📱 Responsive Design
Mobile-friendly interface for all devices - ⚙️ Customizable Settings
Adjust notification intervals and email preferences - 🛡️ Security Focused
XSS protection, input validation, and nonce verification
Installation
- Download the plugin ZIP file
- Go to WordPress Admin → Plugins → Add New → Upload Plugin
- Install and activate
- Plugin will automatically:
- Create necessary database tables
- Set default notification settings
- Schedule notification cron jobs
Usage
For Users
- Add
[user_chat]shortcode to any page/post - Logged-in users will see the chat interface
- Users can only chat with administrators
For Administrators
- Go to User Chats in admin sidebar
- View list of users with unread message counts
- Click "Open Chat" to start conversation
- Available actions:
- Send messages
- Export chat history
- Delete conversation
- Configure settings
Configuration
Go to User Chats → Settings to:
- Set notification email address
- Adjust notification frequency (1-1440 minutes)
- Configure email format
Requirements
- WordPress 5.0+
- PHP 7.4+
- MySQL 5.6+
- jQuery (included with WordPress)
Security Features
- Input sanitization for all user-generated content
- Nonce verification for all AJAX requests
- HTML escaping in message rendering
- Role-based access control
- SQL injection prevention
- Email address validation
- CSRF protection on forms