WordPress Plugin

Sharely.ai for WordPress makes your site's own search work by meaning instead of by matching words, and adds an Ask panel that answers questions from your pages, with links to them. Nobody sees anything they couldn't already see.

Get the plugin and see a demo at sharely.ai/wordpress (opens in a new tab).


What is it?

Sharely.ai for WordPress is a free, GPL-licensed plugin that sends your pages to a Sharely workspace and then answers your site's search box from that workspace. It gives you:

  • Your theme's own search page, ranked by meaning, on block themes and classic themes alike. There is no template to edit.
  • A Sharely Search block and a Sharely Ask block. They take their colors, type, spacing and borders from your theme.
  • A [sharelyai_ask] shortcode for sites that don't use blocks.

A visitor can type a question and get an answer written from your own pages, with links to the pages it came from.

The plugin is a client for the hosted Sharely.ai service, so it needs a Sharely.ai workspace. You don't need to create one first: the first time you set up the plugin, it lets you provision a new workspace right from WordPress, free. To learn more about workspaces, or to add another one later, see Add a new workspace.


What problems does it solve?

WordPress search matches words. Somebody asking "can I bring my dog?" never finds the page headed "Pets on site", because it never says "dog".

The plugin addresses that, and some related concerns:

  • Missed results. Visitors find pages by what they mean, not only by the exact words on the page.
  • Questions without answers. Visitors get a written answer from your content, not just a list of links.
  • Access control. An AI search feature must not leak private content. The plugin carries WordPress roles into Sharely and checks every result again before it is shown.
  • Fragile integrations. If the workspace is unreachable, WordPress search answers instead, exactly as it did before the plugin was installed.

What benefits does it provide?

  • Works with your theme. The blocks use the same markup and classes as the core Search block, so your theme styles them along with everything else.
  • Access by role. Every entry is tagged with the roles allowed to read it, every search runs as the visitor's roles, and every result is checked against WordPress once more before it renders. A private post stays private.
  • Kept in step as you write. Saving, trashing or deleting a page updates the workspace in the background. A status screen shows what was sent, what failed and why.
  • Know what people look for. The plugin keeps what visitors searched for on your site for 30 days. You can turn this off.
  • WP-CLI commands. Sync, check status and reconcile from the command line.
  • Ready for AI agents. On WordPress 6.9 and later, search and ask are exposed as abilities (sharelyai/search and sharelyai/ask), so an AI agent on your site can use them under the same access rules as your visitors. See the Platform Overview.
  • Free, and nothing locked. The plugin is free and GPL, and a free workspace runs everything it does. Larger plans are for sites that outgrow it.
  • No build step. You don't need Node. What is in the plugin folder is what runs.

Before and after installation

BeforeAfter
Search engineWordPress search, which matches the words typedSharely.ai, which ranks results by meaning
Synonyms and plain-language questionsOften return nothingStill find the right page
QuestionsA list of loosely matching pagesAn Ask panel gives a written answer with links to its sources
Search pageYour theme's search pageThe same search page, now answered by Sharely
Content in SharelyNoneYour pages are synced to your workspace and kept current as you save, trash or delete
Visibility rulesWordPress permissionsWordPress permissions, sent as Sharely roles and checked again before every result is shown
If the service is unavailableNot applicableWordPress search answers instead. The Ask panel shows one line saying answers aren't available

Until you connect, the plugin does nothing at all. It adds no blocks, doesn't touch your search page and sends no requests to any Sharely address. Installing it and looking around commits you to nothing.


Requirements

  • WordPress 6.6 or later, tested up to 7.1
  • PHP 8.1 or later
  • A Sharely.ai workspace, created free when you connect

Note: This plugin sends your content to Sharely. Nothing is sent until an administrator connects the site, and disconnecting stops it.


How to install it

Install it from the WordPress plugin directory:

  1. In your WordPress dashboard, go to Plugins → Add New Plugin.
  2. Search for Sharely.ai – AI Search and Ask.
  3. Click Install Now, then Activate.

The plugin's listing is linked from sharely.ai/wordpress (opens in a new tab).


How to set it up

  1. Go to Settings → Sharely.AI.
  2. Click Connect to Sharely.
  3. Sign in to Sharely, or create an account. Creating one is free and takes about a minute.
  4. Approve the site. A workspace named after it is created for you, and you return to WordPress connected. There is no key to paste.
  5. The first sync starts on its own. When it finishes, your theme's own search page is already being answered by Sharely. Nothing else needs configuring.

What gets sent

For each page in scope, the plugin sends the title, URL, language and rendered text, along with the names of the WordPress roles allowed to read it. Media files aren't uploaded, only text.

When a visitor searches or asks a question, their words are sent with a short-lived token naming the roles they hold. Visitors are identified only by an opaque ID. Signed-in users are identified by their WordPress user ID, and everyone else by a random value in a cookie named sharelyai_visitor. No name, email address or IP address is sent.


How to integrate it into your existing WordPress environment

The plugin is designed to fit into the site you already have.

  • Your search page stays the same. Your theme's search page is simply answered by Sharely.
  • Your theme applies. The blocks use the same markup as the core Search block, so there are no extra styles to maintain.
  • Your roles apply. Entries are tagged with the roles allowed to read them. A page that became private since the last sync is caught by the second check at render time.
  • Block and classic themes. The search page works with both. Use the blocks on block themes, or the [sharelyai_ask] shortcode where you don't use blocks.
  • Background syncing. The queue runs in the background. WordPress's own scheduler fires only when somebody visits the site, so a quiet site can sit still for a long time. Installing Action Scheduler, or any plugin that bundles it such as WooCommerce, makes the queue run properly.

If content isn't syncing, run the queue immediately:

wp sharelyai sync --now

The status screen tells you whether you have Action Scheduler or not.


How to customize it

Choose what gets sent

Go to Settings → Sharely.AI → Settings. It lists your post types. Untick the ones you don't want sent. Nothing that isn't in that list is ever sent.

Add the blocks to your own pages

The plugin provides two blocks, which you can add in the block editor:

  • Sharely Search: a search box whose results are ranked by meaning, for a page of your own.
  • Sharely Ask: an answer written from this site's own pages, with links to them.

Both take their look from your theme. For sites that don't use blocks, use the shortcode:

[sharelyai_ask]

Control search statistics

The plugin keeps search words locally, in your own database, for 30 days so the status screen can show what people are looking for. No IP addresses or user IDs are stored with them. You can switch this off and clear what's stored on the Settings tab.

Use the command line

wp sharelyai sync
wp sharelyai status
wp sharelyai reconcile

Self-hosting

If you run Sharely yourself, point the plugin at your own services with the SHARELYAI_API_URL and SHARELYAI_APP_URL constants in wp-config.php. See environment.example.php in the plugin folder.


Update and remove

Update

Update it like any plugin, from Dashboard → Updates, or turn on auto-updates on the Plugins screen. Your connection, settings and statistics are kept, and there is nothing to reconnect.

Remove

  1. Go to Settings → Sharely.AI and click Disconnect. This tells Sharely the site has left.
  2. Deactivate and delete the plugin. This removes everything it stored on your site.

Your workspace and its content stay in Sharely until you delete them there. You can also revoke the site's API key there.


Learn more