{
    "title": "WPCode",
    "seo_title": "WPCode: review, recommended settings and limits",
    "h1": "WPCode",
    "description": "WPCode free or Pro: strengths, limitations, pricing, recommended settings, safe mode and patched vulnerabilities, to add custom code safely.",
    "lead": "WPCode, formerly Insert Headers and Footers, adds header scripts and PHP, CSS or JavaScript snippets without touching your theme. Our take on the free and Pro versions, the settings that keep your site from breaking and the patched vulnerabilities worth knowing.",
    "language": "en",
    "locale": "en-US",
    "type": "plugin-sheet",
    "url": "https://www.wp-feint.com/features/camouflaged-plugins/wpcode/",
    "canonical": "https://www.wp-feint.com/features/camouflaged-plugins/wpcode/",
    "markdown": "https://www.wp-feint.com/features/camouflaged-plugins/wpcode/index.md",
    "json": "https://www.wp-feint.com/features/camouflaged-plugins/wpcode/index.json",
    "published": "2026-11-04T08:00:00+00:00",
    "modified": "2026-11-22T12:52:50+00:00",
    "site": {
        "name": "WP Feint",
        "url": "https://www.wp-feint.com/"
    },
    "translations": [
        {
            "language": "en",
            "hreflang": "en-US",
            "title": "WPCode",
            "url": "https://www.wp-feint.com/features/camouflaged-plugins/wpcode/",
            "markdown": "https://www.wp-feint.com/features/camouflaged-plugins/wpcode/index.md",
            "json": "https://www.wp-feint.com/features/camouflaged-plugins/wpcode/index.json"
        },
        {
            "language": "fr",
            "hreflang": "fr-FR",
            "title": "WPCode",
            "url": "https://www.wp-feint.com/fr/fonctionnalites/extensions-camouflees/wpcode/",
            "markdown": "https://www.wp-feint.com/fr/fonctionnalites/extensions-camouflees/wpcode/index.md",
            "json": "https://www.wp-feint.com/fr/fonctionnalites/extensions-camouflees/wpcode/index.json"
        },
        {
            "language": "es",
            "hreflang": "es-ES",
            "title": "WPCode",
            "url": "https://www.wp-feint.com/es/funcionalidades/plugins-camuflados/wpcode/",
            "markdown": "https://www.wp-feint.com/es/funcionalidades/plugins-camuflados/wpcode/index.md",
            "json": "https://www.wp-feint.com/es/funcionalidades/plugins-camuflados/wpcode/index.json"
        },
        {
            "language": "de",
            "hreflang": "de-DE",
            "title": "WPCode",
            "url": "https://www.wp-feint.com/de/funktionen/getarnte-plugins/wpcode/",
            "markdown": "https://www.wp-feint.com/de/funktionen/getarnte-plugins/wpcode/index.md",
            "json": "https://www.wp-feint.com/de/funktionen/getarnte-plugins/wpcode/index.json"
        },
        {
            "language": "it",
            "hreflang": "it-IT",
            "title": "WPCode",
            "url": "https://www.wp-feint.com/it/funzionalita/plugin-camuffati/wpcode/",
            "markdown": "https://www.wp-feint.com/it/funzionalita/plugin-camuffati/wpcode/index.md",
            "json": "https://www.wp-feint.com/it/funzionalita/plugin-camuffati/wpcode/index.json"
        },
        {
            "language": "pt",
            "hreflang": "pt-BR",
            "title": "WPCode",
            "url": "https://www.wp-feint.com/pt/recursos/plugins-wordpress-camuflados/wpcode/",
            "markdown": "https://www.wp-feint.com/pt/recursos/plugins-wordpress-camuflados/wpcode/index.md",
            "json": "https://www.wp-feint.com/pt/recursos/plugins-wordpress-camuflados/wpcode/index.json"
        },
        {
            "language": "nl",
            "hreflang": "nl-NL",
            "title": "WPCode",
            "url": "https://www.wp-feint.com/nl/functies/gecamoufleerde-plugins/wpcode/",
            "markdown": "https://www.wp-feint.com/nl/functies/gecamoufleerde-plugins/wpcode/index.md",
            "json": "https://www.wp-feint.com/nl/functies/gecamoufleerde-plugins/wpcode/index.json"
        }
    ],
    "headings": [
        {
            "level": 1,
            "text": "WPCode"
        },
        {
            "level": 2,
            "text": "What WPCode does inside WordPress"
        },
        {
            "level": 2,
            "text": "Which sites WPCode is a good fit for"
        },
        {
            "level": 2,
            "text": "WPCode strengths and limitations"
        },
        {
            "level": 3,
            "text": "Strengths"
        },
        {
            "level": 3,
            "text": "Limitations"
        },
        {
            "level": 2,
            "text": "The WPCode settings we recommend"
        },
        {
            "level": 2,
            "text": "WPCode security: a plugin that runs PHP"
        },
        {
            "level": 2,
            "text": "WPCode FAQ",
            "id": "faq"
        }
    ],
    "body": "## The essentials\n\n- Best for adding tracking codes and small PHP snippets without editing your theme or its functions.php.\n- Main caveat: revisions, Testing Mode and page scripts are only in the paid versions.\n- Free; Pro starts at $99 a year for one site ($49 for the first year).\n\n## What WPCode does inside WordPress\n\nWPCode is a code snippets manager: it lets you add PHP, JavaScript, CSS, HTML or text from the admin area without editing your theme's functions.php file. Snippets are stored in the database, so they survive a theme update or a theme switch. Each snippet is inserted automatically at a location you pick (everywhere, admin only, before or after the content, after a given paragraph...) or manually with a shortcode.\n\nThe plugin also adds a \"Header & Footer\" screen with three fields (header, right after the opening body tag, footer) for pasting tracking or verification code, a library of ready-made snippets, code generators and conditional logic: type of page, post type, page URL, referrer, taxonomy, logged-in status or user role. Before a PHP snippet goes live, WPCode runs it once and leaves it inactive if it throws an error. It can import snippets from Code Snippets, Header Footer Code Manager, Post Snippets, Simple Custom CSS and JS and Woody Code Snippets.\n\nSyed Balkhi and the WPBeginner team created it in 2011 as Insert Headers and Footers, and it was renamed WPCode in 2022 (its folder is still called `insert-headers-and-footers`). WPCode is a trademark of WPCode LLC. The paid version, WPCode Pro, adds scheduling, revisions, Testing Mode and page scripts from the Basic plan up; higher plans bring automatic conversion pixels (Plus) and role-based access control (Pro).\n\n![Diagram: WPCode works on visitors and bots, wordpress, database and files. Public traces: folder name (hidden with Pro); tag IDs (hidden with Pro).](https://www.wp-feint.com/media/wpm-sheets/wpcode/diagram-en.svg?v=1e85629a)\n\n## Which sites WPCode is a good fit for\n\nWPCode pays off as soon as you regularly add small pieces of code:\n\n- **Sites that paste third-party code**: a Google Analytics tag, an ad pixel, AdSense or Search Console verification, without touching the theme.\n- **Freelancers and small teams**: PHP tweaks live in a named list you can switch on and off one by one, instead of an ever-growing functions.php.\n- **Sites replacing small single-purpose plugins**: the library has snippets to disable comments or XML-RPC, allow SVG uploads and more.\n\nIt's the wrong tool if your code lives in Git and ships through a deployment pipeline: a custom plugin or an mu-plugin stays easier to track. If all you need is one script in the header, WPCode's \"Headers & Footers mode\" or [Header Footer Code Manager](https://www.wp-feint.com/features/camouflaged-plugins/header-footer-code-manager/) will do; to compare it with its closest rival, see our [Code Snippets](https://www.wp-feint.com/features/camouflaged-plugins/code-snippets/) review.\n\n## WPCode strengths and limitations\n\n### Strengths\n\n- **Free safety nets.** A test run before activation, automatic deactivation of failing snippets in the admin, and a safe mode triggered by a URL parameter.\n- **Conditional logic included.** The free version already filters by type of page, URL, referrer, user role or logged-in status.\n- **Library and generators.** Common snippets install in one click, and generators write the code for post types or structured data.\n- **Easy migration.** Importers for five competing plugins, plus snippet export from one site to another.\n\n### Limitations\n\n- **Revisions and Testing Mode cost extra.** Without them, a snippet edit hits the live site immediately, with no history of earlier versions.\n- **Front-end errors don't deactivate.** A PHP error on the public side is flagged, but the snippet keeps running.\n- **Lots of Pro upsells.** Device targeting, scheduling and page scripts show up in the editor with a PRO label.\n- **Introductory pricing.** The Basic plan costs $99 a year ($49 the first year): the vendor states that renewals are at full price.\n\n## The WPCode settings we recommend\n\nAll of these exist in the current free version, under Code Snippets > Settings and in each snippet's editor.\n\n| Setting | Recommended value | Why |\n| --- | --- | --- |\n| **Error Logging**  Code Snippets > Settings > Error Handling | On | Off by default; it records each snippet's errors, readable under Code Snippets > Tools > Logs. |\n| **Admin Bar Info**  Code Snippets > Settings > General Settings | On (default) | Shows which snippets load on the current page and a \"Snippets With Errors\" link. |\n| **Headers & Footers mode**  Same screen | Off (default) | It cuts WPCode down to the three header and footer fields and disables all your custom snippets. |\n| **AI & Automation Access**  Same screen | Off (default) | Turn it on only if an AI tool connected through the WordPress Abilities API should create or edit your snippets. |\n| **Delete All Data on Uninstall**  Same screen | Off (default) | When on, deleting the plugin wipes every snippet for good. |\n| **Allow Usage Tracking**  Same screen | Per your data policy | It sends the vendor information about your configuration, themes and plugins. |\n| **Location** of a PHP snippet Code Snippets > Add Snippet > Insertion | \"Admin Only\" or \"Frontend Only\" rather than \"Run Everywhere\" | Code that serves one side of the site has no reason to run on the other. |\n\n- Write down the safe mode URL: `/wp-admin/admin.php?page=wpcode&wpcode-safe-mode=1`; it stops auto-inserted snippets for you only.\n- Test every new PHP snippet on a staging copy before turning it on in production.\n- Export your snippets from Code Snippets > Tools > Export and keep the file with your backups.\n- If you're locked out, setting the `WPCODE_SAFE_MODE` constant to true in wp-config.php stops snippets for every visitor: remove it once the snippet is fixed.\n\n## WPCode security: a plugin that runs PHP\n\nBy design, WPCode runs whatever code you give it: an account that can manage snippets can execute any PHP on the server. In the free version, only administrators can manage snippets; granting rights to other roles requires the Pro plan. The published vulnerabilities are mostly about missing permission checks:\n\n- **CVE-2026-8832, fixed in 2.3.6**: an author account could publish a PHP snippet through [XML-RPC](https://www.wp-feint.com/wordpress-xml-rpc-risks/) and get it executed, a [remote code execution](https://www.wp-feint.com/glossary/remote-code-execution/) flaw (CVSS 8.8).\n- **CVE-2023-1624, fixed in 2.0.9**: a CSRF flaw could trick a user allowed to activate snippets into deleting log files.\n- **CVE-2023-0328, fixed in 2.0.7**: any account able to edit posts could change or delete the WPCode Library connection key.\n\nTurn on automatic updates for WPCode (see our guide to automatic plugin updates) and keep the number of administrators and authors low, as explained in our article on WordPress roles and capabilities. WP Feint strips references to WPCode's folder and files from your public code, which makes the plugin harder for bots to spot, but it is no substitute for updating.\n\n## WPCode FAQ\n\n**Is WPCode the same plugin as Insert Headers and Footers?**\n\nYes. Insert Headers and Footers was renamed WPCode in 2022 and kept the same wordpress.org page. If you only want the old header and footer fields, \"Headers & Footers mode\" in the settings brings that interface back.\n\n**Will I lose my snippets if I change themes?**\n\nNo: they're stored in the database, independently of the theme. They only go away if you delete the plugin with the data deletion option turned on.\n\n**What should I do if a PHP snippet breaks my site?**\n\nOpen the snippets list with the `wpcode-safe-mode=1` parameter, deactivate the faulty snippet, then click \"Exit safe mode\". If you can't reach the admin, use the `WPCODE_SAFE_MODE` constant in wp-config.php.\n\n**How much does WPCode Pro cost?**\n\nThe pricing page lists the Basic plan at $99 a year for one site ($49 for the first year), with renewals at full price. Plus (5 sites, $149 a year), Pro (25 sites, with access control, $249 a year) and Bundle (100 sites, $399 a year) work the same way, with a 14-day money-back guarantee.\n\n## Key facts\n\n- Category: Utilities\n- Vendor: WPCode LLC\n- Price: Free; WPCode Pro from $99 per year for one site ($49 for the first year)\n- Active installations (wordpress.org): 3 000 000+\n- Version: 2.4.1\n- Official page: https://wordpress.org/plugins/insert-headers-and-footers/\n\n## What WP Feint hides\n\n- Handled by the free plugin Feint Security\n- With Pro: folder name, tag IDs",
    "catalog": "wpcode",
    "essentials": [
        "Best for adding tracking codes and small PHP snippets without editing your theme or its functions.php.",
        "Main caveat: revisions, Testing Mode and page scripts are only in the paid versions.",
        "Free; Pro starts at $99 a year for one site ($49 for the first year)."
    ],
    "format": "application/json"
}