Skip to main content

WordPress

WordPress is a widely used content management system for publishing and managing web content such as pages, posts, and knowledge base articles. The Glean WordPress connector brings this content into Glean for search and AI assistance, so teams can find published pages, posts, and related discussions without leaving Glean.

Supported features

The WordPress connector enables central ingestion and search across your WordPress site content.

  • Page indexing: Crawls published WordPress pages with title, body content, tags, categories, and comments.
  • Post indexing: Crawls published WordPress posts with title, body content, tags, categories, and comments.
  • Custom post types: Supports crawling custom post type endpoints registered in WordPress, configurable via the customPostEndpoints setting.
  • Comments: Indexes approved comments on posts and pages, including comment text and creation timestamp.
  • Tags and categories: Extracts tags and categories as searchable facets for filtering in Glean.
  • Incremental crawls: Supports incremental crawls using the WordPress REST API after filter, fetching only content modified since the last crawl cycle. Runs approximately every 10 minutes by default.
  • Full crawls: Periodic full crawls detect deletions and state changes not visible to incremental crawls. Runs approximately every 12 hours by default.
  • Multiple instances: Supports connecting multiple WordPress sites to a single Glean deployment. Each data source instance indexes one site; connect additional sites by configuring additional instances.
  • API usage: Glean uses the standard WordPress REST API (/wp-json/wp/v2/) to ingest all data.

Supported objects

  • Pages: Published WordPress pages with title, body (HTML), tags, categories, comments, and update metadata.
  • Posts: Published WordPress posts with title, body (HTML), tags, categories, comments, and update metadata.
  • Custom posts: Content from custom post type endpoints that follow the WordPress REST API format. Tags and categories are included only if the custom post type has registered them as taxonomies.
  • Comments: Approved comments on posts and pages, stored as children of their parent document.
  • Tags: Tag names associated with posts and pages, indexed as keyword facets.
  • Categories: Category names associated with posts and pages, indexed as keyword facets.

Each content type is crawled automatically when the connector is configured. Posts, pages, and custom post types cannot be independently toggled on or off.

Limitations

  • Only content with publish status is indexed. Draft, pending, private, and trashed content is not crawled.
  • Password-protected posts and pages are excluded from indexing.
  • Only approved comments are indexed. Pending, spam, and trashed comments are excluded.
  • The connector does not crawl WordPress users, roles, or groups. No identity data is synchronized to Glean.
  • All indexed content is treated as publicly visible within Glean — WordPress does not provide per-user document-level permissions via its REST API, so all Glean users can see all indexed WordPress content.
  • Webhooks are not supported. Content freshness relies on periodic polling via full and incremental crawls.
  • Federated search is not supported. All content is natively indexed in Glean.
  • Custom post types are limited to endpoints that return responses in the standard WordPress REST API format.
  • The tags endpoint may return 403 Forbidden on some WordPress configurations; this is handled gracefully and does not fail the crawl.
  • Media files (images, videos, PDFs) are not independently crawled. Only the HTML body content of posts and pages is indexed.

API endpoints

EndpointDescription
GET /wp-json/wp/v2/pagesList all published pages
GET /wp-json/wp/v2/postsList all published posts
GET /wp-json/wp/v2/{custom_endpoint}List custom post type content (configurable via customPostEndpoints)
GET /wp-json/wp/v2/comments?post={id}List approved comments for a specific post or page
GET /wp-json/wp/v2/tags?post={id}List tags associated with a specific post or page
GET /wp-json/wp/v2/categories?post={id}List categories associated with a specific post or page

Common query parameters:

  • page — pagination page number
  • per_page — results per page (default: 10)
  • afterISO-8601 datetime filter for incremental crawls

Response header used:

  • X-WP-TotalPages — total page count for pagination

Requirements

Technical requirements

To use the WordPress connector, you need:

  • A self-hosted WordPress site (or WordPress.com Business plan or higher) with the WordPress REST API (/wp-json/wp/v2) enabled.
  • A WordPress user account with an Application Password configured (requires WordPress 5.6 or later).
  • A Glean deployment with access to the Admin console to manage data sources.
  • A WordPress site that Glean can reach over the internet. If the site is behind a firewall, IP allowlist, or other network protection, allowlist Glean's crawler egress IP addresses so the connector can reach it. Contact Glean Support for your instance's egress IP addresses.

Glean connects to WordPress via the WordPress REST API (/wp-json/wp/v2/) over HTTPS and stores indexed data in your organization's Glean deployment.

note

Allowlisting Glean's egress IP addresses only affects whether Glean can reach the site over the network. It does not change what Glean indexes: the connector still crawls only published, public content. Draft, private, and password-protected content is never indexed. See Limitations.

Credential requirements

The connector uses HTTP Basic Authentication with a WordPress Application Password:

  • WordPress site URL (the hostname of your WordPress instance, for example, https://your-site.example.com)
  • Application Username (the WordPress username associated with the Application Password)
  • Application Password (generated in your WordPress user profile under Application Passwords)

Enter these values into the WordPress connector setup in the Glean admin console.

Permission requirements

To configure the connector end-to-end, the person performing setup must:

  • Be a WordPress user with sufficient privileges to generate an Application Password and read all published pages, posts, comments, tags, and categories via the REST API.
  • Be a Glean admin with permission to add and configure data sources.

The connector indexes only content with publish status. Password-protected content and unapproved comments are excluded. All indexed content is treated as publicly visible within Glean — WordPress does not enforce per-user document-level permissions, so all Glean users will see all indexed WordPress content.

Setup and configuration instructions

You must have the following to set up the WordPress connector:

  • A running WordPress site (version 5.6 or later)
  • WordPress admin access
  • Glean admin console access
  • (Optional) Custom post endpoints must be identified if custom post types are indexed.
  • An Application password must be created in WordPress for the dedicated integration account.

Authentication and credentials

  • In WordPress, log in with an administrator account. Navigate to the user's profile and generate a new Application Password for Glean use.
  • Record both the newly created Application Password and the associated username.
  • In Glean's admin console, enter the hostname of the WordPress site, the admin username, and the Application Password in the relevant connector fields.

Setup in the WordPress admin console

  1. Log in to your WordPress site as an administrator and navigate to your user profile.
  2. Create a new Application Password specifically for Glean integration.
  3. Copy the Application Password and username; store this information securely.

Setup in the Glean admin console

  1. Open Glean's admin console and select Add Connector → WordPress.
  2. Input the data source name in the Name text box and select an icon.
  3. Input the Application Username created in the WordPress admin console in the Username text box.
  4. Input the Application Password created in the WordPress admin console in the Application Password text box.
  5. Input the WordPress site hostname, including the scheme (for example, https://your-site.example.com), in the Hostname text box.
  6. Click Save.

Content configuration

The WordPress connector currently has no greenlist (inclusion) or redlist (exclusion) rules. All published, non-password-protected content available with the configured credentials is indexed.

Content scope is controlled by:

  • Published status only: Only posts and pages with status = "publish" are indexed.
  • Password protection: Password-protected content is automatically excluded.
  • Custom post endpoints: You can optionally configure additional custom post type endpoints via the customPostEndpoints setting to expand the crawl scope beyond standard posts and pages.
note

There are no per-post, per-page, per-category, or per-tag inclusion/exclusion filters available for the WordPress connector. To exclude specific content, ensure it is set to a non-published status (for example, draft or private) in WordPress, or restrict the API credentials' access accordingly.

External references