Skip to content

Early-bird lifetime licence: $199 once, for the first 200 buyers only. See the offer

All docs

What Snipfire is

Snipfire is a WordPress plugin for adding your own code to a site: PHP, CSS, JavaScript and HTML snippets. It replaces pasting code into your theme's functions.php or a "header and footer" box, and it does it more safely:

  • You write in a real code editor. The same editor engine as VS Code, with autocomplete for WordPress, WooCommerce and PHP, including WooCommerce's hooks.
  • Or you don't write code at all. Generators make post types, redirects, schema and tracking codes from a form, and the snippet library has more than 250 ready-made snippets.
  • You choose exactly where and when each snippet runs. On a WordPress hook, as a shortcode, or only when you click Run, and only on the pages, for the visitors or at the times you pick.
  • A mistake can't take your site down. Code is checked before it's saved, the site is test-loaded when you switch a snippet on, and a snippet that causes an error is switched off automatically.
  • It's fast. Snippets are stored as files and loaded from one cached index, with no database queries.
  • Switching is painless, both ways. Snipfire imports snippets from other snippet plugins and switches them over for you, and your old shortcodes keep working. And if you ever want a site without Snipfire, export your snippets as a plugin.
  • Updates you can trust. Every release is signed, and Snipfire installs an update only if the signature checks out. See Signed updates.

Two plugins: Snipfire and Snipfire Pro

Snipfire is free, downloaded from snipfirewp.com, and complete on its own. Snipfire Pro is a separate add-on you install next to it. Pro adds features; it doesn't unlock anything hidden in the free plugin.

Free: Snipfire Adds with Snipfire Pro
PHP, HTML, CSS and JavaScript snippets SCSS and LESS, with shared partials, and a live CSS preview as you type
The full code editor: autocomplete, the hook picker that writes the callback, hover docs, formatting, Emmet Cookie consent for scripts, plus the Cookie consent given condition
Crash protection, test loads, automatic switch-off, safe mode Testing mode with a shareable preview link
Every importer, with one-click switch over The visual hook finder
Everyday conditions: page and post types (including WooCommerce pages), posts, terms, URL, query parameters, cookies, users and roles, device, dates, times, weekdays, environment, active plugins More conditions: referrer, visitor country and region, language, WooCommerce cart and customer rules, and your own Custom PHP rule
History: the last 10 versions of each snippet History: the last 50 versions
REST API, WP-CLI, WordPress abilities for AI assistants, JSON export and import, translations Team access by role and the activity log
The snippet library: ready-made snippets in packs Global Privacy Control for marketing scripts
Generators and settings forms Add a settings form to any snippet, and let clients change only the values
Smart tags such as {post_title} and {user_email} in HTML and JavaScript WooCommerce order smart tags for conversion scripts, and the GA4 purchase event generator
The Header & Footer screen, code for one page and the Snipfire block, site files (ads.txt, llms.txt, security.txt, robots.txt lines) and the shortcode finder Scheduled PHP snippets with a run log
Export snippets as a plugin that runs without Snipfire Snippet performance: time and memory per snippet
Page builders: an Elementor widget and a Bricks element (beta), and design tokens in CSS autocomplete A secrets vault for API keys
An editor that works from the keyboard, with screen readers and on phones, a Getting started screen, and system info for support An AI assistant with your own API key: explain, fix, write
Signed updates HTML next to any element, with a visual element picker
The GA4 WooCommerce events generator
Agency plan: Git sync with GitHub and GitLab, the agency hub for your clients' sites, and network snippets for multisite

Which Pro features come with which plan is on Plans.

Throughout these docs, pages and sections marked Pro need Snipfire Pro, and Agency marks Git sync, the agency hub and network snippets, which need the Agency plan.

What happens to Pro settings without Pro

If you remove Snipfire Pro or your licence ends, your snippets keep running and their Pro settings are kept. Settings that need Pro stay safely off until Pro is back:

  • A script that waits for cookie consent doesn't run (rather than running without consent).
  • A snippet in testing mode runs for nobody.
  • A condition that needs Pro stays in the snippet and never matches.
  • An SCSS or LESS stylesheet keeps its last compiled CSS on the site. You need Pro to save changes to it.
  • A snippet with WooCommerce order smart tags isn't printed at all (rather than sending half-empty data).
  • A snippet set to run on a schedule, or next to an element, doesn't run.
  • snipfire_secret() doesn't exist, so snippets that check for it get nothing; the secrets stay stored.

Next

Something unclear or missing? Tell us