108 AI Master
Test your local ollama with actual wordpress (live or local) and build custom intent detection system
by Sanjay · github.com/sanjaynegi88/ollama-chatbot-for-wordpress
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/sanjaynegi88/ollama-chatbot-for-wordpress/archive/refs/heads/main.zipA powerful AI chatbot plugin for WordPress that integrates local LLMs using Ollama. Run AI chatbots directly on your own server without relying entirely on cloud-based AI providers.
This plugin enables WordPress websites to deploy intelligent AI assistants powered by Ollama models such as Llama, Mistral, DeepSeek, Gemma, Phi, and more.
Features
- WordPress AI chatbot integration
- Ollama local LLM support
- Privacy-focused AI processing
- Supports multiple AI models
- Real-time chat responses
- Lightweight REST API architecture
- Conversation memory support
- Custom chatbot UI
- Shortcode support
- Streaming response support
- Multi-model switching
- Developer-friendly hooks & filters
- AI assistant embedding anywhere on WordPress
Supported Models
Compatible with any Ollama-supported model including:
- Llama 3
- Mistral
- DeepSeek
- Gemma
- Phi
- CodeLlama
- TinyLlama
- Custom Ollama models
Requirements
- WordPress 6.0+
- PHP 7.4+
- Ollama installed on server/VPS
- Linux server recommended
- Minimum 8GB RAM recommended for larger models
Installation
- Upload the plugin ZIP file
- Activate the plugin
- Install Ollama on your server
- Configure Ollama endpoint in plugin settings
- Select AI model
- Add chatbot shortcode to pages/posts
Install Ollama
Linux Installation
curl -fsSL https://ollama.com/install.sh | sh
Verify Installation
ollama --version
Download AI Models
Example:
ollama pull llama3
Other examples:
ollama pull mistral
ollama pull deepseek-coder
ollama pull gemma
Start Ollama Server
ollama serve
Default Ollama API URL:
http://localhost:11434
Plugin Configuration
Navigate to:
Settings → Ollama Chatbot
Configure:
- Ollama API URL
- AI Model
- Temperature
- Max Tokens
- System Prompt
- Streaming Responses
- Chat Memory
Shortcode Usage
Embed chatbot anywhere using shortcode:
[ollama_chatbot]
Custom example:
[ollama_chatbot model="llama3" theme="dark"]
REST API Example
Send chat request:
POST /wp-json/ollama-chat/v1/message
Example payload:
{
"message": "Hello AI assistant",
"model": "llama3"
}
AI Features
- Context-aware conversations
- Multi-turn memory
- AI assistant behavior prompts
- Custom personality prompts
- Knowledge assistant workflows
- Coding assistant support
- AI automation workflows
Privacy Focused
Unlike cloud AI services, Ollama allows:
- Local AI processing
- Private conversations
- No external API dependency
- Full data ownership
- Offline AI capabilities
Performance
Performance depends on:
- Server CPU/GPU
- Available RAM
- Selected AI model size
Recommended:
| Model Size | Recommended RAM |
|---|---|
| 3B | 8GB |
| 7B | 16GB |
| 13B | 32GB |
Advanced Features
- Streaming AI responses
- Multi-chat sessions
- Session history
- AI prompt templates
- Custom AI instructions
- Frontend chatbot widget
- AJAX-powered conversations
Developer Hooks
Before AI Request
do_action('ollama_chat_before_request', $payload);
Modify AI Response
apply_filters('ollama_chat_response', $response);
After Chat Completion
do_action('ollama_chat_after_response', $response);
Use Cases
- Customer support chatbot
- AI knowledge base assistant
- Internal business assistant
- AI coding helper
- Educational AI tutor
- AI content assistant
- AI automation workflows
Security
- Sanitized user inputs
- Protected REST endpoints
- Nonce validation
- Rate limiting support
- WordPress coding standards compliant
Troubleshooting
Ollama Server Not Responding
Verify Ollama is running:
ollama serve
Model Not Found
Pull the required model:
ollama pull llama3
Connection Refused
Verify the API URL:
http://localhost:11434
Ensure firewall/server allows local connections.
Future Improvements
- RAG support
- Vector database integration
- PDF/document chat
- Voice chatbot support
- Multi-agent AI workflows
- AI image understanding
- OpenAI compatibility mode
- LangChain integration
License
Licensed under GPL v2 or later.
Author
Built for WordPress AI automation, local LLM hosting, and privacy-focused AI chatbot experiences.