WordPress Code Snippets Plugin — Asteris Code Snippets

What is a WordPress code snippets plugin? A code snippets plugin lets you add custom PHP, JavaScript, and CSS to your WordPress site without editing theme files. This matters because direct edits to functions.php or theme files get overwritten on theme updates — your customisations vanish. A code snippets plugin stores snippets in the database, runs them safely at the right WordPress hooks, and survives theme switches.

Is there a free WordPress code snippets plugin? Yes — Asteris Code Snippets is free at full functionality on WordPress.org. No “lite” version. No gated features. The same module that’s in the paid Asteris for WordPress tiers is the module in the free version. This is intentional — there’s no value in a crippled snippets manager. Install Asteris for WordPress Free →

What happens if my snippet has a PHP fatal error? Asteris’s safe-mode auto-disable catches fatal errors before they take the site down. The snippet that caused the fatal is auto-deactivated, the site continues running, and Asteris logs the error with the line number and stack trace. WPCode and Code Snippets Pro both have similar features; Asteris matches.


The complete feature set

Snippet types

Conditional loading

Run a snippet only when specific conditions match:

Safety features

Snippet library

A built-in library of common snippets:

One click inserts the snippet; you can edit before activating.

Import / export


Where Asteris Code Snippets fits

This module exists for the same reason every WordPress site needs a snippets manager: theme files get overwritten on updates. If you edit functions.php directly, your code disappears the next time the theme author ships an update. Snippets in a snippets manager survive theme updates, theme switches, and plugin updates.

The unique angle: Asteris ships this module free at full functionality. There’s no “Pro” tier for snippets specifically — the snippet manager is identical in Asteris Free and Asteris paid tiers. The paid tiers add the other 10 modules.


When to use Asteris Code Snippets

If you already use a snippets plugin you’re happy with — Asteris’s free version imports your snippets via JSON (WPCode-compatible or Code Snippets-compatible export). You can switch without retyping.


Frequently asked questions

What is a WordPress code snippets plugin? A plugin that lets you add custom PHP, JavaScript, and CSS to a WordPress site without editing theme files. Snippets are stored in the database, run at the right WordPress hooks, and survive theme updates and theme switches.

Is there a free WordPress code snippets plugin? Yes — Asteris Code Snippets is free at full functionality on WordPress.org. Also: Code Snippets (by Code Snippets Pro) has a free version on WP.org; WPCode Lite has a free version. Of the three, Asteris is the only one that ships full features in the free version (no Pro upsell for snippet features specifically).

What happens if my PHP snippet has a fatal error? Asteris’s safe-mode auto-disable catches fatal errors at the snippet level. The snippet that caused the fatal is auto-deactivated, the site continues running, and Asteris logs the error with the line number and stack trace for you to fix.

Can I import snippets from WPCode or Code Snippets? Yes — Asteris imports the JSON export format that both WPCode Pro and Code Snippets use. No retyping required.

Why is the snippets module free at full functionality? Because crippled snippets managers are useless and the marketing math doesn’t work. Asteris’s paid tiers exist for the other 10 modules (Security, SEO, Performance, etc.). Snippets is the wedge into the WordPress.org listing.

Does Asteris replace functions.php? No — it complements it. Theme-specific code that’s tightly coupled to the theme can stay in functions.php. General-purpose customisations (analytics snippets, admin tweaks, conditional feature toggles) belong in a snippets manager so they survive theme updates and theme switches.


Install free on WordPress.org → · See all 11 modules → · Pricing →