Install Trevilo on WordPress

Use the Trevilo plugin to add Trevilo to your WordPress site, then choose whether it loads on every page or only the pages with a form.

Updated 18 Nov 2026

The Trevilo plugin adds the Trevilo script to your WordPress site for you. Your forms keep working exactly as they do now. When a visitor sends one, a copy also comes to Trevilo.

Before you start

  • You need the Site ID or the script for your website from Trevilo. In Trevilo, open Setup and go to Connect your website, then click Copy next to the script. You can also find it later on the Websites page: click Open next to your website.

  • The plugin needs WordPress 6.3 or later and PHP 7.4 or later.

  • You need to be an administrator on your WordPress site.

Install the plugin

  1. Download the Trevilo plugin (a .zip file) from this page.

  2. In WordPress, go to Plugins, then Add New, then Upload Plugin.

  3. Choose the Trevilo .zip file, click Install Now, then Activate.

Until you add your Site ID, WordPress shows a notice: "Trevilo is installed but not connected yet." Nothing loads on your site until a Site ID is saved.

Add your Site ID

  1. Go to Settings, then Trevilo.

  2. In Site ID, paste your Site ID. You can paste the whole script tag instead, and the plugin picks the Site ID out of it. A Site ID starts with site_.

  3. Click Save settings.

The Connection box now shows Connected. Open Script that will be added to see the exact line the plugin puts on your pages.

Choose where Trevilo loads

Under Where to load Trevilo, pick one:

  • Entire site: every front-end page, including the blog, archives, search and 404 pages.

  • Only selected pages: only the pages you choose. Use this if your forms are on a few pages.

  • Entire site except…: every page, minus the pages you exclude.

For Only selected pages, search for each page with a form under Load Trevilo on. For Entire site except…, add the pages to leave out under Don't load Trevilo on. Then click Save settings.

Use the switch in the page editor

With Only selected pages or Entire site except…, you can also turn Trevilo on or off from the page itself:

  1. Under Content types that can be targeted, tick the types you use, such as pages or posts, and save.

  2. Open a page in the editor. In the sidebar, find the Trevilo panel.

  3. Turn Load Trevilo on this page on or off, then update the page.

Check it is working

  1. Open a page on your site that has the script on it.

  2. In Trevilo, click Check this site in Setup, or Check my site on the Websites page. Trevilo looks for the script loading on your site.

  3. Send a real enquiry through one of your forms and check it appears in Trevilo under Enquiries.

If enquiries do not arrive

Caching or optimisation plugins

Some plugins delay scripts until the visitor scrolls or clicks, which can stop Trevilo starting in time. Exclude trevilo.app/t.js from any "delay JavaScript" feature, for example in WP Rocket, LiteSpeed Cache or Perfmatters. After changing settings, clear the plugin's cache.

Cloudflare Rocket Loader

If your site uses Cloudflare Rocket Loader, ask your developer to add this line to a small must-use plugin, so Rocket Loader leaves the Trevilo script alone:

add_filter( 'trevilo_script_attributes', fn( $a ) => $a + array( 'data-cfasync' => 'false' ) );

Content Security Policy

If your site sends a Content Security Policy, allow https://trevilo.app in script-src and connect-src.

The form is inside an embed

Trevilo can only see forms that are part of the page. A form shown inside an embedded frame from another service, or a form built without a normal form element, is not captured. See Add Trevilo to any website for what is and is not captured.

Good to know

  • The script loads with defer, so it never blocks your page from showing.

  • It never loads in the WordPress dashboard, on the login page, or in feeds and embeds.

  • Updates to the plugin arrive like any other plugin update.

  • If you delete the plugin, its settings and every per-page choice are removed.

Install Trevilo on WordPress | Trevilo help