Skip to content

WordPress CMS Integration

For WordPress site owners, Searchcraft provides a plugin that allows you to easily add search to your site. The plugin is available in the WordPress plugin repository.

To use the WordPress plugin you will need:

  • WordPress 5.0 or higher
  • PHP 7.4+
  • A WordPress account with author, editor, or administrator privileges

The easiest way to install the plugin is directly via the WordPress admin panel. Simply search for “Searchcraft” in the WordPress plugin repository and install the plugin. If you are on a managed WordPress host and do not have administrator privileges, you may need to contact your host to install the plugin for you.

Create a Searchcraft Cloud account and create your index

Section titled “Create a Searchcraft Cloud account and create your index”
  1. Create an account on Searchcraft Cloud via the Vektron dashboard.
  2. Within Vektron, follow onboarding steps to create a new application and index, selecting the “WordPress” template on index creation. Copy the provided endpoint url, index name, ingest key and read key values.
  1. Activate the plugin in WordPress.
  2. Within Wordpress navigate to the Searchcraft settings page and fill in the endpoint url, index name, ingest key and read key values. If you received a Cortex url from the Searchcraft team you may enter that, otherwise leave it blank.
  3. That’s it! Searchcraft will automatically prepare your post content for search.

By default all posts and pages will appear in search. If you wish to exclude pages or specific posts from search you can use the exclude from search option in the post editor. If for some reason you need to re-add all of your content to Searchcraft or remove all content you may do so from the plugin’s settings page.

The keyphrase field is only populated if you happen to be using the Yoast plugin and have a focus keyphrase entered

By default the search modules throughout the site will take on the appearance of the styles of your WordPress theme but you may also customize the look and feel as well as the placement of the search modules. See the layout screen within the WordPress admin panel settings for more information. The “Advanced Customization” option is intended for developers and requires knowledge of HTML, CSS, and JavaScript.

The WordPress plugin may make use of the generative AI summaries feature. These summaries are generated using your WordPress site’s own content and cites the sources within the summary. To enable this feature you will need to reach out to Searchcraft to request access.

The plugin may also be used in conjunction with a self-hosted Searchcraft instance. If you are using a self-hosted instance you will need to manually create an index with the following schema before configuring the plugin.

{
"auto_commit_delay": 0,
"enable_language_stemming": false,
"exclude_stop_words": true,
"fields": {
"categories": {
"indexed": true,
"multi": true,
"required": false,
"stored": true,
"type": "facet"
},
"featured_image_url": {
"indexed": false,
"multi": false,
"required": false,
"stored": true,
"type": "text"
},
"id": {
"indexed": false,
"multi": false,
"required": true,
"stored": true,
"type": "text"
},
"keyphrase": {
"indexed": true,
"multi": false,
"required": false,
"stored": true,
"type": "text"
},
"permalink": {
"indexed": false,
"multi": false,
"required": false,
"stored": true,
"type": "text"
},
"post_author_id": {
"fast": true,
"indexed": true,
"multi": false,
"required": false,
"stored": true,
"type": "u64"
},
"post_author_name": {
"indexed": false,
"multi": false,
"required": false,
"stored": true,
"type": "text"
},
"post_content": {
"indexed": true,
"multi": false,
"required": false,
"stored": true,
"type": "text"
},
"post_date": {
"fast": true,
"indexed": true,
"multi": false,
"precision": "seconds",
"required": false,
"stored": true,
"type": "datetime"
},
"post_excerpt": {
"indexed": true,
"multi": false,
"required": false,
"stored": true,
"type": "text"
},
"post_title": {
"indexed": true,
"multi": false,
"required": false,
"stored": true,
"type": "text"
},
"primary_category_name": {
"indexed": false,
"multi": false,
"required": false,
"stored": true,
"type": "text"
},
"tags": {
"indexed": true,
"multi": true,
"required": false,
"stored": true,
"type": "text"
}
},
"language": "en",
"search_fields": [
"post_title",
"post_excerpt",
"post_content",
"keyphrase"
],
"weight_multipliers": {
"keyphrase": 1,
"post_content": 0.5,
"post_excerpt": 1,
"post_title": 2
}
}

If you need additional assistance contact the Searchcraft team on our Discord server and we can help!