Installation on WordPress
If your website runs on WordPress, our free plugin, AI for Home Services, puts the XAPP AI widget on every page of your site. The widget includes your AI Chat Agent and your Book Online button. All you need is your Widget Key.
Prerequisites
Before proceeding, ensure that you have:
- Administrative access to your WordPress website.
- WordPress version 4.7 or higher, and PHP 7.2 or higher.
Installation
Method 1: Installing via WordPress Admin Panel
-
Access WordPress Admin: Log in to your WordPress admin dashboard.
-
Navigate to Plugins: On the admin sidebar, click on
Plugins > Add New. -
Search for "XAPP AI": In the search field, type
XAPP AIand press Enter.

-
Install the Plugin: Locate
AI for Home Servicesin the search results and click onInstall Now. -
Activate the Plugin: After installation, click on
Activateto enable the plugin on your WordPress site.
Method 2: Uploading the Plugin
-
Download the Plugin: Visit the AI for Home Services plugin page and click
Download. -
Upload It: In your WordPress admin dashboard, go to
Plugins > Add New, clickUpload Plugin, choose the.zipfile you downloaded, and clickInstall Now. You can also unzip it and upload the folder to/wp-content/plugins/over FTP. -
Activate the Plugin: Go to
Plugins, findAI for Home Servicesin the list, and clickActivate.
Configure the Plugin
-
In your WordPress admin dashboard, go to
Settings > XAPP AI. -
Paste your Widget Key into the Widget Key field. If you came here from XAPP AI Studio, your key is shown below.
Otherwise, see How to Find the Widget Key.
-
Click
Save Changes. Your widget will appear in the lower right corner of every page on your site. If you use a caching plugin, clear its cache, then reload the page in a private window.
You configure what the widget shows, such as the AI Chat Agent's greeting, colors and position, and your Book Online button, in XAPP AI Studio. You don't need to change anything in WordPress.
Older versions of the plugin had separate keys for a Scheduling Widget and for Intelligent Search. Intelligent Search was removed in version 1.2. The Scheduling Widget Key is deprecated, because the widget now loads your scheduling form. If you still have one saved, see the note at the end of the next section.
Different Widgets on Different Pages (Multiple Locations)
With version 1.4 and later, the plugin can load a different widget on different parts of your site. For example:
- one widget per location, on each location's pages
- a support widget on your support pages
- your default widget everywhere else, such as your home and service pages
Leads from a location's pages then go to that location. You set this up in the Per-page widgets (advanced) section of the plugin's settings page. The Widget Key at the top of that page stays your site-wide default.
How Pages Are Matched
Each rule has a Path, a Widget Key, and an optional Label. The label is a note for you, so you can tell your rules apart. It only shows on the settings page.
- A rule covers its path and every page under it. A rule for
/north-side/covers/north-side/pest-control/too. - Paths match whole segments only.
/north/does not cover/north-side/. - When more than one rule fits a page, the longest path wins. This means a rule for one neighborhood page can sit inside a broader rule for its area.
- Capital letters, query strings such as
?utm_source=google, and a missing trailing slash are all ignored. You can also paste a full URL, and the plugin keeps only its path. - Pages that no rule covers load the default Widget Key.
Adding Rules
- In the WordPress Admin panel, go to Settings -> XAPP AI and scroll to Per-page widgets (advanced).
- Click Add rule. Fill in the Path and that page's Widget Key, and optionally a Label. See How to Find the Widget Key.
- Repeat for each rule, then click Save Changes.
To delete a rule, click Remove on its row, then click Save Changes.
Quick Import
If you have many rules, you can paste them all at once instead of adding them one by one. Put one rule per line in the Quick import box, in this order: path, widget key, label.
# path, widget key, label
/north-side/, NORTH_SIDE_WIDGET_KEY, North Side office
/south-side/, SOUTH_SIDE_WIDGET_KEY, South Side office
/support/, SUPPORT_WIDGET_KEY, Support
- You can separate the fields with commas or with tabs. Tabs mean you can copy the rows straight out of a spreadsheet.
- Blank lines and lines starting with
#are ignored. - If two lines have the same path, only the first one is used.
Click Preview to check the lines, then choose one of these:
- Replace all rules swaps your current rules for the imported ones.
- Merge (same path overwrites) adds the imported rules to the ones you already have. An imported line replaces any existing rule with the same path.
Click Save Changes to keep the imported rules.
Remembering the Visitor's Location
Turn on Remember the visitor's location for their visit if your location pages link to shared pages such as /contact/ or /get-a-quote/. With it on, a visitor who opened a page with a rule, such as a location page, keeps that rule's widget on pages that no rule covers. This lasts until they close the browser tab.
Pages that a rule covers always use that rule. The setting is stored in the visitor's browser, so it keeps working with page caching plugins.
Testing a Page
To check which widget will load on a page, enter its URL in Test a URL and click Which widget loads here? The test uses the rules on the settings page as they are now, including changes you haven't saved. Once you save, open a few of the pages in a private window to confirm the right widget appears. If you use a caching plugin, clear its cache first.
The separate Scheduling Widget Key is deprecated, because your widget now loads your scheduling form. If you still have one saved, it appears on the settings page marked as deprecated. While it's set, it loads on pages without a rule. To stop using it, turn on the scheduling form for your widget in XAPP AI Studio, then clear the key and save.
Help AI assistants find your business on WordPress
AI assistants such as ChatGPT, Claude and Gemini can ask your business questions and send you leads directly, through a connection made for AI agents. When the website widget loads, it adds tags to your page that tell assistants where that connection is. Some assistants read a page without running its scripts, so they never see those tags. Adding the same tags to your site's page header reaches them too. Having the tags in both places does no harm: when the page already has them, the widget leaves them as they are.
Before you start
- You need administrator access to your WordPress dashboard.
Steps
-
Log in to your WordPress admin dashboard.
-
If you don't already have it, install the free
WPCodeplugin: go toPlugins>Add New, search forWPCode, clickInstall Nowon "WPCode – Insert Headers and Footers", and clickActivate. -
In the left sidebar, go to
Code Snippets>Header & Footer. -
Paste the code below into the
Headerbox:<link rel="mcp-server" href="https://agentic.xapp.ai/YOUR_APP_ID/mcp">
<link rel="mcp-manifest" href="https://agentic.xapp.ai/YOUR_APP_ID/.well-known/mcp/manifest.json">
<link rel="mcp-server-card" href="https://agentic.xapp.ai/YOUR_APP_ID/mcp/server-card">Note! Please replace "YOUR_APP_ID" with your actual app ID.
-
Click
Save Changes.
Check it worked
- Open your website in a browser.
- View the page source (
Ctrl+Uon Windows,Option+Cmd+Uon a Mac). - Search for
mcp-server. You should find it near the top of the page, in the header.
Troubleshooting
- The tags don't appear: make sure you published or saved the change, then clear your browser cache and reload.
- The tags are in the page body, not the header: move them into the header setting, not a section or block on the page.
What the plugin adds for AI assistants
The plugin (version 1.2 and later) also publishes your business's assistant at the addresses AI assistants check on your site, such as /.well-known/mcp/server-card.json. There's no setup beyond your Chat Widget Key, and you can turn it off under the plugin's settings. See AI Agent Discovery.
Troubleshooting
If you encounter issues during installation, check the following:
- Ensure WordPress is up-to-date.
- Confirm that you have administrative privileges.
- Check for plugin compatibility with your WordPress version.
- For manual installations, verify that the plugin files were uploaded correctly.
For additional WordPress support, visit the plugin's OC Studio Integration Support Forum.