Download the PHP package tag1/scolta-wp without Composer

On this page you can find all versions of the php package tag1/scolta-wp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package scolta-wp

Scolta for WordPress

CI

Built and maintained by Tag1 Consulting — technology leadership since 2007.

WordPress 6.x plugin — WP-CLI commands, Settings API page, [scolta_search] shortcode, and AI-powered search built on Pagefind.

Status

Scolta 1.0 — the plugin API documented here is stable. Breaking changes follow semantic versioning: no removal or signature change without a major version bump and a deprecation cycle. File bugs at the repo issue tracker.

What Is Scolta?

Scolta is a scoring, ranking, and AI layer built on Pagefind. Pagefind is the search engine: it builds a static inverted index at publish time, runs a browser-side WASM search engine, produces word-position data, and generates highlighted excerpts. Scolta takes Pagefind's result set and re-ranks it with configurable boosts — title match weight, content match weight, recency decay curves, and phrase-proximity multipliers. No search server required. Queries resolve in the visitor's browser against a pre-built static index.

This plugin is the WordPress adapter. It provides WP-CLI commands for building and maintaining the index, a Settings API admin page, a [scolta_search] shortcode, content change tracking, and REST API endpoints for the AI features. The actual scoring, indexing logic, memory management, and AI communication live in scolta-php, which this plugin depends on via Composer. Scoring runs client-side via the scolta.js browser asset and the pre-built WASM module shipped with scolta-php.

The LLM tier — query expansion, result summarization, follow-up questions — is optional. When enabled, it sends the query text and selected result excerpts to a configured LLM provider (Anthropic, OpenAI, or a self-hosted Ollama endpoint). The base search tier shares nothing with any third party.

Running Example

The examples in this README and the other Scolta repos use a recipe catalog as the concrete data set. Recipes are a good showcase because recipe vocabulary has genuine cross-dialect mismatches:

Here is how to model and index the recipe catalog in WordPress:

1. Register a recipe custom post type with custom fields: _recipe_cuisine, _recipe_diet, _recipe_cook_time.

2. Add the scolta_content_item filter to include the regional synonyms in the indexed content:

3. Enable the recipe post type in Settings > Scolta > Content > Post types to index.

4. Build the index:

5. Add [scolta_search] to any page. Visit the page and search for aubergine parmesan. Scolta surfaces Eggplant Parmigiana because Pagefind's stemmer matches both "aubergine" and "eggplant" in the indexed content, and Scolta's title boost lifts the most relevant result.

The recipe fixture HTML files live in scolta-php at tests/fixtures/recipes/ if you want a pre-built data set without a WordPress database.

Quick Install

Add to wp-config.php:

With an API key configured, search queries are automatically expanded with related terms, results include an AI summary, and visitors can ask follow-up questions.

Verify It Works

This verifies PHP version, index directories, indexer selection, AI provider configuration, and binary availability. Fix any items marked as failed before proceeding.

The REST health endpoint also reports current state: GET /wp-json/scolta/v1/health. Anonymous requests return only the overall status value (enough for uptime monitoring); the full diagnostic payload — AI provider, index detail, integrity breakdown — requires an authenticated request from a user with manage_options.

What Scolta Is Built For

Scolta is designed for content search on WordPress sites: posts, pages, custom post types, and other content indexed at publish time. WordPress powers over 40% of the web — marketing sites, editorial platforms, membership communities, documentation portals, and enterprise intranets — and Scolta is tuned for these content-publishing use cases.

The static-index architecture means no Elasticsearch or Solr server to manage. Scolta works on managed WordPress hosting (WP Engine, Kinsta, Flywheel, Pantheon) where running a dedicated search server is not possible. For dynamic sites that publish frequently, Scolta's auto-rebuild feature queues a re-index whenever content is saved — so the search index stays current without manual intervention.

Scolta replaces hosted search SaaS (Algolia, Coveo, SearchStax) and Elasticsearch-backed plugins (ElasticPress, SearchWP) for WordPress sites where the search use case is content relevance, recency, and vocabulary matching. WooCommerce sites already have Action Scheduler installed — enabling Scolta's auto-rebuild requires no additional dependencies.

Memory and Scale

The default memory profile is conservative, which targets a peak RSS under 96 MB and works on shared hosting with a 128 MB PHP memory_limit. Scolta never silently upgrades to a larger profile.

The Settings > Scolta > Memory Budget field accepts a profile name or an exact byte value:

The Settings > Scolta > Chunk Size field sets pages-per-chunk independently of the memory budget. Leave it blank to use the profile default. Lower values reduce peak RAM; higher values reduce merge overhead on large corpora.

Both settings apply to every PHP-indexer build path — wp scolta build, the admin Rebuild Now button, and Action Scheduler background rebuilds all stream content through the same budget-aware pipeline.

Both settings can be overridden per-run:

Tested ceiling at the conservative profile: 50,000 pages. Higher counts likely work; not certified yet.

AI Features and Privacy

Scolta's AI tier is optional. When enabled:

The base search tier — Pagefind index lookup and Scolta WASM scoring — runs entirely in the visitor's browser with no server-side involvement beyond serving static index files.

Configuration

AI Provider

Configure at Settings > Scolta > AI Provider, or via wp-config.php constants.

Selecting a provider is always manual. Scolta ships with none selected: the field opens on - Select a provider -, and while nothing is selected AI features are off, no provider is assumed, and Anthropic in particular is not silently assumed. This is going-forward only — a site that already saved a provider keeps it and keeps working, and nothing rewrites an existing value.

Amazee.ai is never enabled on its own. Selecting it in the list connects nothing. On the Amazee.ai settings screen you choose one of two actions:

When a connection stops being accepted, AI degrades cleanly, /health reports it, and the settings page points at the account path. The settings notice and wp scolta status state which of the two actions established the current connection, because that is recorded when it happens rather than inferred afterwards; a connection made before Scolta recorded it says only "Connected to Amazee.ai".

Setting Option key Default Description
Provider ai_provider (none) anthropic, openai or amazee. No default: while none is selected, AI features are off and search works exactly as it does now.
API key env/constant only — SCOLTA_API_KEY env var or define('SCOLTA_API_KEY', '...') in wp-config.php
Model ai_model claude-sonnet-4-5-20250929 LLM model identifier
Base URL ai_base_url provider default Custom endpoint for proxies or Azure OpenAI
Query expansion ai_expand_query true Toggle AI query expansion on/off
Summarization ai_summarize true Toggle AI result summarization on/off
Summary top N ai_summary_top_n 10 How many top results to send to AI for summarization
Summary max chars ai_summary_max_chars 4000 Max content characters sent to AI per request
Max follow-ups max_follow_ups 3 Follow-up questions allowed per session
AI languages ai_languages ['en'] Languages the AI responds in (matches user query language)

These are stored in the scolta_settings WordPress option. Use Settings > Scolta to edit them, or update programmatically:

Tuning search breadth

Getting fewer results than you expect on a recipe, product, or catalog site? Go to Settings > Scolta > Site Type and choose the Recipe & Content Catalog preset, then save and rebuild your index (wp scolta build).

Scolta defaults to a conservative search breadth so generic words ("easy", "quick", "best") don't flood your results. On a recipe or catalog site, the useful domain words you actually want to match — ingredients, techniques, product attributes — are common enough that the default can hide them. The Recipe & Content Catalog preset widens the breadth (and tunes a handful of other ranking settings) so those searches return the fuller set of matches you'd expect.

Pick the Site Type that matches your site and Scolta sets sensible defaults for you:

Your site Preset
Recipes, product or content catalogs Recipe & Content Catalog
Docs, knowledge bases, encyclopedias, references Documentation & Reference
Online stores E-commerce & Product Store
Blogs and editorial sites Blog & Editorial
News sites Start from Scratch, then tune recency

You rarely need to touch individual numbers — the preset is the recommended path, and any value you change by hand in the Scoring section still overrides the preset. The one advanced knob worth knowing is Search Breadth (expand_subword_max_frequency): higher returns more results but can pull in loosely-related matches; lower keeps results tight. The Recipe & Content Catalog preset already raises it from 0.05 to 0.10.

For the evidence behind each preset — the scoring sweeps and the per-parameter data — see scolta-php's docs/TUNING.md.

Search Scoring

Configure at Settings > Scolta > Scoring.

Setting Option key Description
Title match boost title_match_boost Boost when query terms appear in the title
Title all-terms multiplier title_all_terms_multiplier Extra multiplier when ALL terms match the title
Content match boost content_match_boost Boost for query term matches in body/excerpt
Expand primary weight expand_primary_weight Weight for original query results vs AI-expanded results (higher = original query dominates; raise to 0.7+ if you want literal keyword matches to win)
Recency strategy recency_strategy Decay function: exponential, linear, step, none, or custom
Recency boost max recency_boost_max Maximum positive boost for very recent content
Recency half-life days recency_half_life_days Days until recency boost halves
Recency penalty after days recency_penalty_after_days Age before content gets a penalty (~5 years)
Recency max penalty recency_max_penalty Maximum negative penalty for very old content
Language language ISO 639-1 code for stop word filtering
Custom stop words custom_stop_words Extra stop words beyond the language's built-in list
Specificity-weighted ranking specificity_weighting On by default. Weight each partial match by how rare its term is in the corpus, so a match on a rare, intent-bearing term outranks a match on a ubiquitous one. This is what stops a common word, typed or leaked from an expansion phrase, from flooding the head of the result list. Turn off to restore flat sub-query weighting.
Specificity floor specificity_floor Floor for the specificity weight of a ubiquitous term (0-1, default 0.15). A term appearing in nearly every document is damped to this multiplier rather than to zero, so it still contributes to recall while ranking far below rare terms. Lower is more aggressive damping.
Specificity strong-match threshold specificity_strong_match Specificity at or above which a matched term counts as a strong, on-intent hit (0-1, default 0.55). When a term this specific matched, the partial-match banner and the AI summary stop framing the result set as a failure and attribute any gap to the search rather than the collection.
Co-occurrence agreement bonus specificity_cooccurrence Multiplier on the bonus a result earns for agreeing with several query and expansion terms at once, rather than matching one term strongly (0-5, default 0.9). A page that is on-topic across the whole query usually answers it better than one that spikes on a single rare word. Set to 0 to score each result purely by its single best-matching sub-query.
Co-occurrence agreement gate specificity_agreement_gate Specificity a term must clear before it counts toward the agreement bonus (0-1, default 0.45). Terms below the gate are too common for their presence to be evidence of topical agreement, so they are excluded rather than inflating the count.
Co-occurrence agreement decay specificity_agreement_decay Geometric factor applied to each successive agreeing term (0-5, default 1.0), so the second is worth this fraction of the first and so on. Values below 1 make the bonus saturate, which keeps a long page matching many mid-specificity terms from overtaking a focused page matching a genuinely rare one.
Expansion combine mode expansion_combine_mode How a multi-term query expansion combines its per-sub-query results into the AI-summary candidate set: relevance_union (historical behavior) or round_robin (deal the top few from each sub-query so the summary sees breadth across sub-topics). Preset-defaulted — the Recipe & Content Catalog, Blog & Editorial, and E-commerce presets default it to round_robin; the others use relevance_union — and any value you set by hand overrides the preset. The visible result list stays relevance-sorted either way.

Defaults and the full reference: scolta-php docs/CONFIG_REFERENCE.md.

News site (recency matters a lot):

Documentation site (recency doesn't matter, titles matter a lot):

Recipe catalog (no recency, title precision matters):

Search as you type

Configure at Settings > Scolta > Search as you type.

Typing in the search box populates a suggestions dropdown under it. The full search — AI query expansion, the AI summary, follow-up questions — still runs only on Enter, on the search button, or when someone picks a suggestion. It is on by default and needs no index rebuild: it reads the index you already have.

Setting Option key Default Description
Suggestions sayt_enabled true Master switch. Set to false to get the pre-1.1.0 search box back exactly: no dropdown, no combobox roles, no browser storage, no suggest searches
Minimum characters sayt_min_chars 2 Characters typed before suggestions are requested, counted as a person counts them (an emoji is one). CJK sites usually want 1
Typing debounce sayt_debounce_ms 150 Milliseconds of pause before suggestions are fetched
Max suggestions sayt_max_suggestions 6 Most suggestions shown, and the cap on index reads per pass
Recent searches sayt_recent_searches true Offer the visitor's own recent searches, kept in their browser under a single Scolta key. false reads and writes nothing
Max recent searches sayt_max_recent 3 Most recent searches shown above the content suggestions
AI enrichment sayt_expand true Enrich suggestions with AI query expansion. Inert with no AI provider configured, or with AI Query Expansion off
AI enrichment cap sayt_expand_per_minute 6 Enrichment calls per visitor per minute. SAYT expansions spend the same per-visitor AI budget as committed searches, so an uncapped suggest path would starve the search someone actually ran. Over the cap the dropdown falls back to keyword suggestions
AI enrichment delay sayt_expansion_delay_ms 500 Idle milliseconds before an enrichment call. Longer than the typing debounce on purpose: keyword suggestions should appear while typing, an AI call should not
Suggestion action sayt_suggestion_action navigate navigate opens the result directly; search puts the title in the box and runs the full search. A recent search always runs the search

Turning it off site-wide, without visiting the settings screen:

Full behaviour, including the browser events and the theming custom properties: scolta-php docs/SAYT.md.

Display

Configure at Settings > Scolta > Display.

Setting Option key Description
Excerpt length excerpt_length Characters shown in result excerpts
Results per page results_per_page Results shown per page
Max Pagefind results max_pagefind_results Total results fetched from index before scoring

Defaults and the full reference: scolta-php docs/CONFIG_REFERENCE.md.

Site Identity

Configure at Settings > Scolta > Content.

Setting Option key Default Description
Site name site_name blog name Included in AI prompts so the AI knows what site it's searching
Site description site_description website Brief description for AI context

Custom Prompts

Override the built-in AI prompts at Settings > Scolta > Custom Prompts, or use the scolta_prompt filter:

$promptName is one of expand_query, summarize, or follow_up.

Debugging

"Pagefind binary not found"

On managed hosting (WP Engine, Kinsta, Flywheel, Pantheon), exec() is disabled and the binary cannot run. The plugin falls back to the PHP indexer automatically — the search experience is identical. To confirm:

If you want the binary on a host that supports it:

The PHP indexer supports 14 languages via Snowball stemming. The Pagefind binary supports 33+ languages and is 5–10× faster for large sites, but requires Node.js ≥ 18 or a direct binary download.

"AI features not working"

  1. Verify API key: wp scolta check-setup
  2. Clear stale cache: wp scolta clear-cache
  3. Confirm the model name is current at Settings > Scolta > AI Provider

"AI summary says 'I don't have enough context'"

The defaults (10 results, 4000 chars) are already tuned for curation. If still insufficient, increase further:

"AI responses are in the wrong language"

Set ai_languages to match your site's language(s):

"Expanded queries return irrelevant results"

Raise expand_primary_weight (default: 0.5) to make original query terms dominate more, or disable expansion:

"No search results"

  1. Check index status: wp scolta status
  2. Run a full rebuild: wp scolta build
  3. Confirm the Pagefind output directory is web-accessible (Settings > Scolta > Pagefind)
  4. Flush rewrite rules: wp rewrite flush

"Build is slow"

Use wp scolta diagnose to identify which phase dominates:

Output example:

If gather dominates (>50%): apply_filters('the_content', ...) is the bottleneck. Use the scolta_content_item filter to replace the body HTML with raw $post->post_content or do_blocks($post->post_content):

If indexer dominates (>50%): Increase the chunk size to reduce merge overhead. Either use a larger profile (--memory-budget=balanced, which sets 200 posts/chunk) or set the chunk size directly (--chunk-size=200) while keeping your current memory profile.

For per-phase wall-clock breakdowns during a live build, run with --debug:

Each [scolta] line now includes +Xs elapsed since build start, making it easy to see which chunk or merge step is slow.

"Build hangs or times out"

The plugin uses proc_open() with a 5-minute timeout for Pagefind binary builds. PHP indexer builds run in chunks via Action Scheduler to avoid PHP timeouts. If builds stall:

"Fatal error on Settings page after upgrade"

Run wp scolta check-setup from CLI to check for configuration issues. If the admin page is unreachable, deactivate and reactivate the plugin to re-run the activation migration.

WP-CLI Commands

REST API Endpoints

Method Path Description
POST /wp-json/scolta/v1/expand-query Expand a search query into related terms
POST /wp-json/scolta/v1/summarize Summarize search results
POST /wp-json/scolta/v1/followup Continue a search conversation
GET /wp-json/scolta/v1/health Health check — anonymous: overall status only; full detail requires manage_options
GET /wp-json/scolta/v1/build-progress Current build status (admin only)
POST /wp-json/scolta/v1/rebuild-now Trigger immediate background rebuild (admin only)

Endpoints are public by default. Use the scolta_search_permission filter to restrict access.

Extend Indexed Content

By default, Scolta indexes all published posts and pages. Add custom post types at Settings > Scolta > Content > Post types to index.

Use the scolta_content_item filter to append custom fields before a post is indexed:

Optional Upgrades

Upgrade to the Pagefind binary indexer

The plugin auto-selects the PHP indexer on managed hosts. On hosts that support binaries, the Pagefind binary is 5–10× faster. The search experience is identical either way — both produce a Pagefind-compatible index.

Change Settings > Scolta > Indexer to "Auto" or "Binary" and rebuild.

Keeping the Index Fresh

When auto_rebuild is enabled in Settings > Scolta, the plugin listens for content changes (post saves and deletes) and automatically schedules a debounced rebuild after a configurable delay (default: 5 minutes). This requires Action Scheduler.

Three paths are available, in order of reliability:

Path A: Action Scheduler (recommended)

Install Action Scheduler to get automatic background index builds when content changes. WooCommerce sites already have it — just enable auto_rebuild in Settings > Scolta.

Path B: System cron

For hosts with SSH access. This is the most reliable option after Action Scheduler because it runs on the system clock and doesn't depend on WordPress page loads.

Adjust the path and interval to taste. --incremental only processes tracked changes, so runs are fast when nothing has changed.

Path C: WP-Cron via WP Crontrol

For users without SSH access who can't install Action Scheduler. Install WP Crontrol, then add this to your theme's functions.php or a custom plugin:

In Tools > Cron Events, add a new cron event: hook name scolta_scheduled_rebuild, recurrence "Every 15 minutes" (or "Twice hourly").

Caveat: WP-Cron events are triggered by page loads, not by the system clock. On low-traffic sites the rebuild may not run on schedule. If the site gets consistent traffic this works fine; otherwise Path B is more reliable.

Requirements

The Pagefind binary is optional — the PHP indexer works without it.

Testing

Unit tests (no WordPress required):

Integration tests (requires DDEV):

Architecture

This plugin handles WordPress-specific concerns: WP-CLI commands, Settings API, shortcodes, REST endpoints, post hooks for change tracking, Action Scheduler integration, and asset enqueueing. It depends on scolta-php and never on scolta-core directly. Scoring runs client-side via WebAssembly loaded by scolta.js.

About Tag1 Consulting

Scolta is designed, built, and maintained by Tag1 Consulting. Tag1 has been delivering technology leadership since 2007 and is one of the leading open-source consulting firms in the world.

Tag1 offers AI strategy, architecture, and implementation consulting — from evaluating whether AI search is right for your organization, to production deployment and ongoing tuning. If you need help integrating Scolta, customizing scoring for your content model, or connecting it to your AI provider of choice, get in touch.

Credits

Scolta is built on Pagefind by CloudCannon. Without Pagefind, Scolta has no search to score — the index format, WASM search engine, word-position data, and excerpt generation are all Pagefind's. Scolta's contribution is the layer that sits on top: configurable scoring, multi-adapter ranking parity, AI features, and platform glue.

License

GPL-2.0-or-later

Related Packages


All versions of scolta-wp with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
tag1/scolta-php Version ^1.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tag1/scolta-wp contains the following files

Loading the files please wait ...