WP SyntaxHighlighter
This plugin is code syntax highlighter based on Alex Gorbatchev’s SyntaxHighlighter ver. 3.0.83 and 2.1.382.
Consider an alternative
WP SyntaxHighlighter shows warning signs in 2026 — compare the alternatives below before installing. It runs on 300+ sites, is rated 5/5 and was last updated 15 years ago, and scores 33/100 on our health check.
- Small user base (300+ active installs)
- Very few reviews so far
- No update in 14 years
- Only tested up to WordPress 3.3 (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 SyntaxHighlighter stands todayWordPress.org search rankings
Live position in the plugin search, top 100| Keyword | Position |
|---|---|
| code | >100 |
| Highlight | >100 |
| sourcecode | #29 |
| syntax | >100 |
| SyntaxHighlighter | #34 |
Version adoption
Share of active sites per release.
Rating breakdown
★★★★★★★★★★ 5 from 1 reviews
About WP SyntaxHighlighter
From the official readme · v1.7.3Description
This plugin is code syntax highlighter based on Alex Gorbatchev’s SyntaxHighlighter ver. 3.0.83 and 2.1.382.
Features
- Based on Alex Gorbatchev’s “SyntaxHighlighter” JavaScript library.
- Including both SyntaxHighlighter 3.0.83 and 2.1.382.(Can switch between 3.0.83 and 2.1.382.)
- Built-in TinyMCE buttons and Quicktag button are easy to operate.
- Easy to wrap your code in
<pre>tag and change options of previously-wrapped code. - Support shortcode also.
- Easy to highlight code in comments using buttons.(WordPress 3.0 or higher)
- Widget to show highlighted code.
- Support bbPress plugin 2.0 or higher.
- Support “Dynamic Brush Loading” which allows to load only necessary brush files dynamically.
- Loading JavaScripts on only posts, pages, home, archives, search results and comments which have the code to highlight.
- Easy to configure features through the setting panel.
- Localization: English(Default), 日本語(Japanese, UTF-8).
Supported languages
AppleScript, ActionScript3, Bash, ColdFusion, C, C++, C#, CSS, Delphi, Diff, Erlang, Groovy, HTML, Java, Java FX, JavaScript, Pascal, Patch, Perl, PHP, Plain text, PowerShell, Python, Ruby, Ruby on Rails, Sass, SCSS, Shell, SQL, VB, VB NET, XHTML, XML and XSLT
Note: A part of languages are only for SyntaxHighlighter 3.0.
You can also use a bundled plugin to add following languages.
Biferno, Clojure, DOS batch file, F#, LISP, Lua(only for SyntaxHighlighter 3.0), MEL Script, Objective-C, PowerCLI, Processing, R, S, S-PLUS, Tcl, Verilog, Vim Script and YAML
For details, see “sample” directory.
There are many other languages for “SyntaxHighlighter”. But I can’t bundle them because they are not compatible with this plugin license. If you want, try to search.
Recommended plugin
- “SyntaxHighlighter TinyMCE Button” can provide feature-rich tinyMCE buttons for SyntaxHighlighter.
- “CodeMirror for CodeEditor” can highlight sourcecodes in theme and plugin editor and provide a useful toolbar.
Thanks
- “SyntaxHighlighter” libraries was created by Alex Gorbatchev.
- “shBrushBiferno.js” was created by Sandro Bilbeisi.
- “shBrushClojure.js” was created by Daniel Solano Gómez.
- “shBrushDosBatch-V2.js” and “shBrushDosBatch-V3.js” were created by Andreas Breitschopp. He also developed nice plugins.
- F# brush was written by Steve Gilham.
- “shBrushLisp.js” was created by Knut Haugen.
- “shBrushLua.js” was created by 최익필.
- “shBrushMel.js” was created by Skye Book.
- “shBrushObjC.js” was created by Matej Bukovinski.
- “shBrushPowerCLI.js” was created by Dan J.
- “shBrushProcessing.js” was created by Sebastian Korczak.
- The css for “shBrushProcessing.js” was written by Sebastian Korczak.
- “shBrushR.js” was created by Yihui Xie.
- “shBrushTcl.js” was created by henix.
- “shBrushVerilog.js” was created by Hanly De Los Santos.
- “shBrushVimscript.js” was created by nelstrom(Drew Neil).
- “shBrushYaml.js” was created by Nicolas Perriault.
- Judah revised the awkward descriptive text that was shown before comment form.
Installation
Installation
- Upload plugin folder to the
/wp-content/plugins/directory. - Activate the plugin through the “Plugins” menu in WordPress.
- If you need, go to “Settings” -> “WP SyntaxHighlighter” to configure.
Usage in Visual editor
Note: The build-in “SH TinyMCE Button” can work only with the default visual editor(TinyMCE). Other visual editors(e.g. CKEditor etc.) are not supported.
Note: If you don’t have “unfiltered_html” capability, <!--[XXXX]--> can’t be included in your code.
XXXX = 2-4 letter character string including 0-9, A-F or a-f.
Usage: Wrap your code in <pre> tag with “SH TinyMCE Button”.
If you have previously-written code on your post or page, by this way, you can wrap your code in <pre> tag for ‘SyntaxHighlighter’.
- With the mouse, select and highlight your code where you want to aplly “SyntaxHighlighter”.
- Click “pre” button.
- Select language and options.
- Click “Insert” button.
Usage: Paste your code into the post or page with “SH TinyMCE Button”.
If you want to copy the code from the other document and paste into your post or page, this way is best. Your pasted code will be warpped in <pre> tag automatically.
- Click “CODE” button.
- Select language and options and paste your code into textbox.
- Click “Insert” button.
Usage: Change language and options of previously-markuped code with “SH TinyMCE Button”.
- With the mouse, select and highlight your code.
- Click “pre” button.
- Change language and options.
- Click “Update” button.
Usage: Indent by tabs.
- Just type tab in your code. But till your code is wrapped in
<pre>tag, you can not type any tabs.
Usage in HTML editor
Note: If you don’t have “unfiltered_html” capability, <!--[XXXX]--> can’t be included in your code.
XXXX = 2-4 letter character string including 0-9, A-F or a-f.
Usage: Wrap your code in <pre> tag with “SH pre” button.
If you have previously-written code on your post or page, by this way, you can wrap your code in <pre> tag for ‘SyntaxHighlighter’.
Note: Before you use “SH pre” button, you may need to go to setting panel and activate “Add Quicktag Button” option in “HTML Editor Settings” section.
- With the mouse, select and highlight your code where you want to aplly “SyntaxHighlighter”.
- Click “SH pre” button.
- Select language and options.
- Click “OK” button. Then your code will be wrapped in
<pre>tag and escape to HTML entities.
Usage: Wrap your code in <pre> tag without “SH pre” button.
- Just wrap Your Code in
<pre>tag with the class attribute as below in HTML editor or using the “Preformatted” style in Visual editor.
You do not need to escape your code to HTML entities. This plugin will escape your code to HTML entities automatically after saving. However, To prevent destroying your code after switching to “Visual editor”, You had better escape your code to HTML entities or save it before switching to “Visual editor”.
Note: If </pre> tags are included in your code, replace </pre> with <!--[/pre]-->.
<pre class="brush: lang">Your Code</pre> *"lang" = your language
- e.g.
<pre class="brush: php">Your PHP Code</pre> - e.g.
<pre class="brush: xhtml">Your XHTML Code</pre>
See “Available languages“. *”Brush aliases” means “lang”.
You can also use some options with <pre> tag.
See “Options“.
- e.g.
<pre class="brush: xhtml; first-line: 10">Your XHTML Code</pre> - e.g.
<pre class="brush: php; html-script: true">Your PHP Code</pre>
This plugin also can support <script> tag method. However, No one should use <script> tag. You must use “HTML editor” to type <script> tag, and when switching to “Visual editor”, TinyMCE will destroy your tag.
Even if using “” method, your codes must be escape to HTML entities.
Just escape following 3 characters: <, >, &
Usage: Wrap your code in shorcode(without unsig buttons).
You can also wrap your in “shorcode” to highlight your code without using buttons.
Note: Before you use “shorcode”, you must go to setting panel and activate “Support shortcode” option in “HTML Editor Settings” section.
Note: Don’t edit a post/page with codes wrapped in shortcode in “Visual editor” or switch from “HTML editor” to “Visual editor”. When your code wrapped in shorcode is displayed in Visual editor, “Visual editor” will destroy your code.
- e.g.
[sourcecode language="php" gutter="true" firstline="1" highlight="" htmlscript="false"]Your PHP Code[/sourcecode] - e.g.
[sourcecode lang="xhtml" gutter="true" firstline="1" highlight="" htmlscript="false"]Your XHTML Code[/sourcecode]
This plugin supports WordPress.com’s posting sourcecode method.
Posting Source Code — Support — WordPress.com
You do not need to escape your code to HTML entities. This plugin will escape your code to HTML entities automatically.
Note: The shorcodes can’t be included in your code.
Post a comment with code(s)
Note: Once you enable “Commnets” in “Higlight your code in” option through the setting panel, this plugin allows visitors to post their source code as comments.
Note: The default comment form is required to highlight codes in comments. When default comment system is replaced with other(e.g. DISQUS etc.) or closed, the codes in commnets can’t be highlighted and “Comment Highlighter Button” can’t be shown.
Note: If you don’t have “unfiltered_html” capability, <!--[XXXX]--> can’t be included in your code.
XXXX = 2-4 letter character string including 0-9, A-F or a-f.
If you use WordPress 3.0 or higher, you had better enable “Comment Highlighter Button” in the setting panel. “Comment Highlighter Button” will help visitors to post a comment with their sourcecodes and highlight them.
Usage: Post a comment with codes using “<pre> tag” button.
- Paste your code in the comment form.
- Select it and then click the language link button.
- This will wrap your code in
<pre>tag and format it when submitted
You do not need to escape your code to HTML entities. This plugin will escape your code to HTML entities automatically.
Note: <!--[/pre]--> can’t be included in your code.
Usage: Post a comment with codes using “Shorcode” button.
- Paste your code in the textarea.
- Select it and then click the language link button.
- This will wrap your code in shortcode(like a BBcode) and format it when submitted
You do not need to escape your code to HTML entities. This plugin will escape your code to HTML entities automatically.
Note: The shorcodes can’t be included in your code.
Usage: Wrap your code in <pre> tag(without unsig buttons).
You can also enter <pre> tag directly without using “Comment Highlighter Button”.
-
Just wrap Your Code in
<pre>tag with the class attribute as when you use HTML editor without “SH pre” button.Your Code
*”lang” = your language
- e.g.
<pre class="brush: php">Your PHP Code</pre>
You do not need to escape your code to HTML entities. This plugin will escape your code to HTML entities automatically.
Note: If </pre> tags are included in your code, replace </pre> with <!--[/pre]-->.
Usage: Wrap your code in shorcode(without unsig buttons).
You can also enter “shorcode” directly without using “Comment Highlighter Button”.
Note: Before you use “shorcode”, you must go to setting panel and activate “Support shortcode” option in “Comment Form Settings” section.
- e.g.
[sourcecode language="php" gutter="true" firstline="1" highlight="" htmlscript="false"]Your PHP Code[/sourcecode] - e.g.
[sourcecode lang="xhtml" gutter="true" firstline="1" highlight="" htmlscript="false"]Your XHTML Code[/sourcecode]
This plugin supports WordPress.com’s posting sourcecode method.
Posting Source Code — Support — WordPress.com
You do not need to escape your code to HTML entities. This plugin will escape your code to HTML entities automatically.
Note: The shorcodes can’t be included in your code.
Usage: Update comments.(For administrator)
You can use “SH pre” button in the “Comment editor”.
Note: Note: Before you use “SH pre” button, you may need to go to setting panel and activate “Add Quicktag Button” option in “Comment Editor Settings” section.
You can also wrap your code in <pre> tag or shortcode without using “SH pre” button.
Note: Before you use “shorcode”, you must go to setting panel and activate “Support shortcode” option in “Comment Form Settings” section.
WP SyntaxHighlighter Widget
“WP SyntaxHighlighter Widget” is the widget to show highlighted code.
Before you use “WP SyntaxHighlighter Widget”, you must enable “Use WP SyntaxHighlighter Widget” in setting panel. Then go to “Widgets” section under “Appearance” menu to add the “WP SyntaxHighlighter Widget” in your sidebar.
You can use plain text, html tag and sourcecode in the widget.
Usage: Using “<pre> tag” button.
- Paste your code in the textarea.
- Select it and then click the language link button.
- This will wrap your code in
<pre>tag.
You do not need to escape your code to HTML entities. This plugin will escape your code to HTML entities automatically.
Note: <!--[/pre]--> can’t be included in your code.
Usage: Using “Shorcode” button.
- Paste your code in the textarea.
- Select it and then click the language link button.
- This will wrap your code in shortcode(like a BBcode).
You do not need to escape your code to HTML entities. This plugin will escape your code to HTML entities automatically.
Note: The shorcodes can’t be included in your code.
Usage: Wrap your code in <pre> tag(without unsig buttons).
You can also enter <pre> tag directly without using buttons.
-
Just wrap your code in
<pre>tag with the class attribute as when you use HTML editor without “SH pre” button.Your Code
*”lang” = your language
- e.g.
<pre class="brush: php">Your PHP Code</pre>
You do not need to escape your code to HTML entities. This plugin will escape your code to HTML entities automatically.
Note: If </pre> tags are included in your code, replace </pre> with <!--[/pre]-->.
Usage: Wrap your code in shorcode(without unsig buttons).
You can also enter “shorcode” directly without using buttons.
Note: Before you use “shorcode”, you must go to setting panel and activate “Support shortcode” option in “WP SyntaxHighlighter Widget Settings” section.
- e.g.
[sourcecode language="php" gutter="true" firstline="1" highlight="" htmlscript="false"]Your PHP Code[/sourcecode] - e.g.
[sourcecode lang="xhtml" gutter="true" firstline="1" highlight="" htmlscript="false"]Your XHTML Code[/sourcecode]
This plugin supports WordPress.com’s posting sourcecode method.
Posting Source Code — Support — WordPress.com
You do not need to escape your code to HTML entities. This plugin will escape your code to HTML entities automatically.
Note: The shorcodes can’t be included in your code.
bbPress
If bbPress plugin(2,0 or higher) is installed and activated, “bbPress Highlighter Button” can be shown above topic/reply form to make easy to post sourcecodes.
Before you use “bbPress Highlighter Button”, you must enable “bbPress Highlighter Button” in setting panel.
Note: If you don’t have “unfiltered_html” capability, <!--[XXXX]--> can’t be included in your code.
XXXX = 2-4 letter character string including 0-9, A-F or a-f.
Usage: Post a topic/reply with codes using “<pre> tag” button.
- Paste your code in the topic/reply form.
- Select it and then click the language link button.
- This will wrap your code in
<pre>tag and format it when submitted
You do not need to escape your code to HTML entities. This plugin will escape your code to HTML entities automatically.
Note: <!--[/pre]--> can’t be included in your code.
Usage: Post a topic/reply with codes using “Shorcode” button.
- Paste your code in the topic/reply form.
- Select it and then click the language link button.
- This will wrap your code in shortcode(like a BBcode) and format it when submitted
You do not need to escape your code to HTML entities. This plugin will escape your code to HTML entities automatically.
Note: The shorcodes can’t be included in your code.
Usage: Wrap your code in <pre> tag(without unsig buttons).
You can also enter <pre> tag directly without using “bbPress Highlighter Button”.
-
Just wrap Your Code in
<pre>tag with the class attribute as when you use HTML editor without “SH pre” button.Your Code
*”lang” = your language
- e.g.
<pre class="brush: php">Your PHP Code</pre>
You do not need to escape your code to HTML entities. This plugin will escape your code to HTML entities automatically.
Note: If </pre> tags are included in your code, replace </pre> with <!--[/pre]-->.
Usage: Wrap your code in shorcode(without unsig buttons).
You can also enter “shorcode” directly without using “bbPress Highlighter Button”.
Note: Before you use “shorcode”, you must go to setting panel and activate “Support shortcode” option in “bbPress Settings” section.
- e.g.
[sourcecode language="php" gutter="true" firstline="1" highlight="" htmlscript="false"]Your PHP Code[/sourcecode] - e.g.
[sourcecode lang="xhtml" gutter="true" firstline="1" highlight="" htmlscript="false"]Your XHTML Code[/sourcecode]
This plugin supports WordPress.com’s posting sourcecode method.
Posting Source Code — Support — WordPress.com
You do not need to escape your code to HTML entities. This plugin will escape your code to HTML entities automatically.
Note: The shorcodes can’t be included in your code.
In Topics/Replies sections on the setting panel
In Topics/Replies sections, Use “pre” and “code” buttons in Visual editor or “SH pre” button in HTML editor.
Note: Note: Before you use “SH pre” button, you may need to go to setting panel and activate “Add Quicktag Button” option in “HTML Editor Settings” section.
You can also wrap your code in <pre> tag or shortcode without using “SH pre” button.
Note: Before you use “shorcode”, you must go to setting panel and activate “Support shortcode” option in “bbPress Settings” section.
Note: Don’t edit a topic/reply with code wrapped in shortcode in “Visual editor” or switch from “HTML editor” to “Visual editor”. When your code wrapped in shorcode is displayed in Visual editor, “Visual editor” will destroy your code.
Legacy mode
You can switch to “Legacy mode” through setting panel.
“Legacy mode” allows you to use the old style tag in SyntaxHighlighter ver. 1.5 library(Not mean WP SyntaxHighlighter ver. 1.5).
Your codes must be escape to HTML entities, even if using <textarea> method.
Just escape following 5 characters: <, >, &, “, ‘
See “Ver. 1.5 Usage“.
In “Legacy mode”, your selected brushes(languages) will be pre-loaded. Only pre-loaded brushes(languages) can highlight your source code with old style tag. The old style tag can’t depended on “autoloader” in ver. 3.0 mode. By default, all brushes(languages) will be pre-loaded in “Legacy mode”.
“Legacy mode” may save your previous posts with old style tag. However, No one should continue using old style tag. You must use “HTML editor” to type old style tag.
Add new languages(brush files)
You can add new languages(brush files) using “Action hooks” and associative array.
For details, see “sample” directory.
There is a sample plugin for adding new languages.
Changelog
This version has some changes and bug fixes.
1.7.3
- Modified wp_sh_escape_code(), wp_sh_wp_filter_kses(), wp_sh_replace_marker(), wp_sh_add_extra_bracket() filters with preg_replace_callback().
- Added wp_sh_make_clickable() filter to apply make_clickable() to the content when the content includes no sourcecode.
- Fix a bug: Wrong regular expression in wp_sh_escape_code().
- Fix a bug: wp_sh_escape_code() can’t handle sourcecode including [sourcecode], [source] or [code].
- Fix a bug: WP SyntaxHighlighter version doesn’t be shown in “12. Your System Info” setting section.
1.7.2
- Added wp_sh_strip_shortcodes() and wp_sh_strip_shortcode_tag() for stripping shortcode tag.
1.7.1
- Fix a bug: Filters can’t handle sourcecodes including $n(n = numbers) correctly.
1.7
- Support bbPress plugin.
- Support shortcode.
- Added another button which makes easy to insert “shortcode” for the comment form.
- Added another button which makes easy to insert “shortcode” for “WP SyntaxHighlighter Widget”.
- Users without “unfiltered_html” also can edit a post with codes.
- Comments before approved can be highlighted.
- Added new filters for posts.
- Replaced filters for comment with new ones.
- A part of defaut setting values changed.
- Bundled sample plugin can add new language(Biferno).
- Splited the main php file in order to reduce file size.
- Fix a bug: Added filters for comment form can’t handle sourcecodes including
&#xxx;correctly. - Fix a bug: Using bloginfo() in the wrong way.
- Fix a bug: Some missing textdomains.
- Fix a bug: The mix LF and CR/LF in a part of SyntaxHighligter core files.
1.6.7
- Modified Quicktag processing to be compliant with WordPress 3.3.
- Added “Quick code copy” option into the setting panel.
- Fix a bug: Wrong textdomain fot localization.
- Fix a bug: Wrong replacing
</pre>tag in the code when comment updated.
1.6.5
- Added “SH pre” button into the Comment editor.
- Added “Load jQuery and jQuery UI” option into the setting panel.
- Enabled to escape souececodes to HTML entities automatically when updating a commnet.
- Fix a bug: Loaded jQuery UI component affects other ajax buttons.
- Fix a bug: When using WordPress 3.0.6 or older, “SH pre” button doesn’t work.
- Fix a bug: When using WordPress 2.9.2 or older, after saving changes, some setting values get empty. Some problems might come to the surface after upgrading to WordPress 3.0 or higher.
- Fix a bug: TinyMCE “code” button can’t handle sourcecodes including HTML entities(
&,<,>,",'😉 correctly. - Fix a bug: Added filters for comment form can’t handle sourcecodes including HTML entities(
&,<,>,",'😉 correctly. - Fix a bug: “WP SyntaxHighlighter Widget” can’t handle sourcecodes including HTML entities(
&,<,>,",'😉 correctly. - Fix a bug: A typo in setting values.
Screenshots
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 SyntaxHighlighter alternatives
All code plugins →FAQ
WP SyntaxHighlighter: quick answers
Straight answers, pulled from live WordPress.org data.
Live data from WordPress.org · checked Sep 29, 2026
Is WP SyntaxHighlighter free?
Yes. WP SyntaxHighlighter is free to download and use from the official WordPress.org plugin directory.
Is WP SyntaxHighlighter safe to use in 2026?
WP SyntaxHighlighter shows warning signs in 2026 — compare the alternatives below before installing. It runs on 300+ sites, is rated 5/5 and was last updated 15 years ago, and scores 33/100 on our health check.
How many websites use WP SyntaxHighlighter?
WP SyntaxHighlighter is active on 300+ WordPress websites and has been downloaded 50,440 times since it launched in May 2011. It was downloaded 87 times in the last 30 days.
Does WP SyntaxHighlighter work with WordPress 7.1?
WP SyntaxHighlighter is officially tested up to WordPress 3.3.2, while the latest release is 7.1.2. It may still work, but try it on a staging site first.
When was WP SyntaxHighlighter last updated?
The latest version, 1.7.3, was released on February 29, 2012 (15 years ago).
Who makes WP SyntaxHighlighter?
WP SyntaxHighlighter is developed and maintained by redcocker.
What are the best alternatives to WP SyntaxHighlighter?
The most popular alternatives to WP SyntaxHighlighter are WPCode (3M+ installs), Code Snippets (1M+ installs) and Head & Footer Code (100K+ 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