WPCode
by Awesome Motive
Safely stores PHP, JavaScript and CSS snippets with conditional logic and error protection instead of editing functions.php.
This link may earn us a commission. It never changes our rating.
What WPCode does
Safely stores PHP, JavaScript and CSS snippets with conditional logic and error protection instead of editing functions.php.
It sits in the code snippets part of a WordPress stack and is sold by Awesome Motive on a freemium basis. We recommend it in our code snippets guides because it does that one job well without asking you to rebuild the rest of the site around it.
Every plugin adds work to a page request, so treat this as a decision with a cost. Record a speed test before you install it and run the same test afterwards, on the same page, so you know exactly what it charged you.
Real user ratings
Score
4.9/5
Reviews
1,880
Active installs
3,000,000+
Downloads
92.6M
Latest version
2.3.9
Last updated
2026-08-27
These figures come straight from the public WordPress.org plugin directory API for version 2.3.9, not from us. Check them yourself on the WordPress.org listing. Our own editorial score is 4.9/5.
Where WPCode ranks elsewhere
WPCode does not appear in the published "best of" lists we track from WPBeginner, TechRadar, Kinsta, Themeisle and similar sites. That is not a mark against it - those roundups are short and skew towards the biggest names.
What changed in the latest version
- Fix: PHP fatal error when a snippet error was logged on a frontend or REST request while the logs folder was missing.
- Fix: Snippets no longer get overwritten with visual editor content when other plugins trigger editor events in the admin.
- Fix: Library snippet previews now always start at the top of the code.
- Fix: PHP fatal error on some admin AJAX requests from the library connect notice.
- Tweak: You can now resize the code editor on the Live CSS Preview screen by dragging the divider between it and the preview, and it remembers the size you set.
- Tweak: Editing an active snippet now requires permission to activate snippets; without it the editor is read-only.
- New: Set up a whole group of related snippets at once with Snippet Packs - pick a pack and install every snippet in it with a single click, then manage or remove a pack anytime while keeping any snippets you use across other packs.
Release notes are the developer's own words, published on WordPress.org. Read the full changelog
Pros and cons
- Error protection stops white screens
- A free tier you can trial before paying
- Actively maintained and used on production sites we test
- Advanced conditions are premium
- The features most sites need sit in the paid tier
How to use it
- 1Add one snippet at a time and give it a clear descriptive title.
- 2Set the placement and any conditional rules before activating.
- 3Activate on staging first if the snippet touches checkout or login.
- 4Use the error protection feature so a bad snippet cannot lock you out.
- 5Export your snippets so they can be restored on another site.
How it compares
Other code snippets plugins we recommend, with their rating and pricing model.
| Plugin | Our rating | WordPress.org | Pricing | Best for |
|---|---|---|---|---|
| WPCode | 4.9 | 4.9 (1,880) | Freemium | Error protection stops white screens |
| Advanced Scripts | 4.6 | n/a | Premium | Precise placement conditions |
| Code Snippets | 4.8 | 4.7 (509) | Freemium | Simple, proven and free |
| Header Footer Code Manager | 4.6 | 4.9 (309) | Freemium | Made for tracking tags |
| Insert Headers and Footers | 4.8 | 4.9 (1,880) | Freemium | Fastest way to add a tracking tag |
| Simple Custom CSS and JS | 4.7 | 4.4 (103) | Freemium | CSS and JS with version history |
Guides that cover WPCode
Alternatives
Other code snippets plugins
Advanced Scripts
Wise Plugin
A premium snippet manager with fine-grained placement, conditions and a code editor built for developers.
Code Snippets
Code Snippets Pro
The original snippet manager, with per-snippet activation and a clean import and export format.
509 reviews · 23.1M downloads · v3.10.2
Header Footer Code Manager
99robots
Inserts tracking and verification code in the header, body or footer with site-wide or per-page rules.
309 reviews · 9.1M downloads · v1.1.46

