Description
This plugin provides Ollama integration for the WordPress AI Client. It lets WordPress sites use large language models running locally or on a remote Ollama instance for text, image, embedding, and speech generation and other AI capabilities.
Ollama exposes an OpenAI-compatible API, and this provider uses that API to communicate with any model you have pulled into Ollama (Llama, Mistral, Gemma, Phi, and many more).
Features:
- Text generation with any Ollama model
- Image generation with supported models
- Embedding generation with any embedding-capable Ollama model
- Text to speech with speech models such as phonon (Ollama 0.40.9+, Apple Silicon only)
- Typed decisions (choice, yes/no probability, and score) with local decision models such as nimble and tev1
- Automatic model discovery from your Ollama instance
- Function calling support
- Structured output (JSON mode) support
- Settings page for host URL and seeing available models
- Works without an API key for local instances
Requirements:
- PHP 8.2 or higher
- WordPress 7.0 or higher
- Ollama running locally or on a remote server (like Ollama Cloud)
Installation
- Upload the plugin files to
/wp-content/plugins/ai-provider-for-ollama/. - Activate the plugin through the ‘Plugins’ menu in WordPress.
- Go to Settings > Ollama to configure the host URL and see available models.
FAQ
How do I install Ollama?
Visit ollama.com to download and install Ollama for your platform. Once installed, pull a model (example ollama pull llama3.2) and the provider will automatically discover it.
Do I need an API key?
No. For local Ollama instances, no API key is needed. The plugin automatically handles authentication for local setups.
For remote Ollama instances that require authentication, enter the API key in the Settings > Connectors screen. If using Ollama Cloud, you also need to set your Ollama host URL in the Settings > Ollama screen to https://ollama.com.
How do I change the Ollama host URL?
By default, the provider connects to http://localhost:11434. You can change this in two ways:
- Set the
OLLAMA_HOSTenvironment variable (takes precedence). - Go to Settings > Ollama in the WordPress admin and enter your host URL.
Where do I report security bugs found in this plugin?
Please report security bugs found in the source code of the AI Provider for Ollama plugin through the Patchstack Vulnerability Disclosure Program. The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin.
Screenshots
Changelog
1.4.0 – 2026-10-30
Added
- Support for text-to-speech with Ollama speech models such as
phonon, including voice selection (requires Ollama 0.40.9+) (#115). - A refresh models button on the settings page (#102).
Changed
- Refresh the cached model list when the host or API key changes (#102).
- Bump PHP minimum supported version to 8.2 and test against PHP 8.2 through 8.5 (#105).
Fixed
- Ensure we properly declare text to speech generation support when used alongside the AI plugin (#121).
Security
- Resolves GHSA-cvg2-2wh8-3p8v (GHSA-cvg2-2wh8-3p8v).
1.3.0 – 2026-10-08
Added
- Support for Jev-style decision models (#103).
ai_provider_for_ollama_request_timeoutandai_provider_for_ollama_connect_timeoutfilters to override Ollama request and connect timeouts (#89).
Changed
- Optimized Ollama model discovery and availability checks by caching model details, reducing redundant
/api/showrequests, and adding separate timeouts for discovery requests (#100).
Fixed
- Ensure we only declare function calling support on models that advertise support for tools (#94).
1.2.0 – 2026-08-18
Added
Changed

