WP Code Pre
This simple plugin was created because of security concerns related to using PHP preg_replace directly. With transition to PHP7, it’s advised to use preg_replace_callback instead.
Consider an alternative
WP Code Pre shows warning signs in 2026 — compare the alternatives below before installing. It runs on 10+ sites and was last updated 5 years ago, and scores 23/100 on our health check.
- Small user base (10+ active installs)
- Very few reviews so far
- No update in 5 years
- Only tested up to WordPress 5.8 (latest is 7.1)
How does it stack up?
Side-by-side on installs, updates, ratings & supportDaily downloads
Download spikes usually follow a new release — each site that auto-updates counts as a download.
Rankings
Where WP Code Pre stands todayWordPress.org search rankings
Live position in the plugin search, top 100| Keyword | Position |
|---|---|
| Code Highlight | >100 |
| filter content | >100 |
Version adoption
Share of active sites per release.
About WP Code Pre
From the official readme · v1.0Description
This simple plugin was created because of security concerns related to using PHP preg_replace directly. With transition to PHP7, it’s advised to use preg_replace_callback instead.
This plugin uses built-in supported feature of PHP-“highlight_string”. This plugin filters post content inside custom html block for
and helps display html and other source code.
To display source code in your posts, surround source code with pre tags. Plugin will filter for pre tags and add inline styles that may be modified using your wordpress theme’s css stylesheet.
For WordPress versions 5.0 and above, HTML pre tags can be used within html block or, classic block. Use the three dot menu to convert to html when there is a invalid content error while post editing.
Installation
- Download the plugin
- Upload the wp-code-pre.zip folder to your site’s wp-content/plugins directory
- Activate the plugin in the WordPress Admin Panel
- Surround source code with
<pre> </pre>tags, when writing in blog posts using Gutenberg with classic block and “Edit as HTML” or, html block
Changelog
1.0
- First version of the plugin.
1.0.1
- Updated readme to reflect updates to version 5.0
For developers
Is this your plugin? Show off the numbers.
Add a live badge to your site, docs or GitHub README. It updates on its own — no account needed.
Best WP Code Pre alternatives
All Code Highlight plugins →FAQ
WP Code Pre: quick answers
Straight answers, pulled from live WordPress.org data.
Live data from WordPress.org · checked Sep 30, 2026
Is WP Code Pre free?
Yes. WP Code Pre is free to download and use from the official WordPress.org plugin directory.
Is WP Code Pre safe to use in 2026?
WP Code Pre shows warning signs in 2026 — compare the alternatives below before installing. It runs on 10+ sites and was last updated 5 years ago, and scores 23/100 on our health check.
How many websites use WP Code Pre?
WP Code Pre is active on 10+ WordPress websites and has been downloaded 2,680 times since it launched in September 2017. It was downloaded 139 times in the last 30 days.
Does WP Code Pre work with WordPress 7.1?
WP Code Pre is officially tested up to WordPress 5.8.17, while the latest release is 7.1.2. It may still work, but try it on a staging site first.
What PHP version does WP Code Pre need?
WP Code Pre requires PHP 7.0 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.
When was WP Code Pre last updated?
The latest version, 1.0, was released on August 8, 2021 (5 years ago).
Who makes WP Code Pre?
WP Code Pre is developed and maintained by zeshanb.
What are the best alternatives to WP Code Pre?
The most popular alternatives to WP Code Pre are Code Block (200+ installs), WP Code Highlight (200+ installs) and WP Editarea (100+ installs).
Powered by PageForge
Want thousands of pages that rank like these? Build them in an afternoon.
This directory runs on the same engine as PageForge. Turn any spreadsheet, CSV or API into thousands of fast, SEO-ready WordPress pages — with schema, internal links and AI-written copy baked in.
- CSV, Google Sheets & API data sources
- AI content, schema & internal links per page
- Works with Elementor, Gutenberg, Yoast & Rank Math
- Free on WordPress.org — no credit card


