Pastacode
by Willy Bahuaud 4.9 (14 reviews)

Pastacode

Use Pastacode to add code into your posts with the awesome PrismJs coloration library. So, past'a code!

Pastacode ranks #9,492 among WordPress.org plugins with 400+ active installations, is #1,283 of 8,297 in the Customization category, a 4.9/5 rating from 14 reviews, and was last updated Mar 12, 2026. Data from WordPress.org, refreshed twice daily — see methodology.

Tested up to WP 6.9 (Current: 7.0.2)
v3.0.1 Current Version v3.0.1
Updated 4 months ago Last Update on 12 Mar, 2026
Refreshed 13 hours ago Last Refreshed on
#1,283 of 8,297 in Customization Top 25% by installs
View on WordPress.org
Rank
#9,492
No change
Active Installs
400+
No change
KW Avg Position
39.3
No change
Downloads
25K
+4 today
Support Resolved
0%
No change
Rating
98%
Review 4.9 out of 5
4.9 (14 reviews)

Next Milestone 500

Total Progress 79%
400+ 500+
201
Ranks to Climb
-
Growth Needed
8,000,000
Active Installs
Pro

Unlock Exact Install Count

See the precise estimated active installs for this plugin, calculated from real-time ranking data.

  • Exact install estimates within tiers
  • Track install growth over time
  • Milestone progress predictions
Upgrade to Pro
Need 21 more installs to reach 500+

Rank Changes

9,470 9,477 9,484 9,491 9,498 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026 27-07-2026 28-07-2026 29-07-2026
9,457 9,467 9,478 9,488 9,498 14-07-2026 15-07-2026 16-07-2026 17-07-2026 18-07-2026 19-07-2026 20-07-2026 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026 27-07-2026 28-07-2026 29-07-2026
9,442 9,457 9,471 9,485 9,500 29-06-2026 30-06-2026 01-07-2026 02-07-2026 03-07-2026 04-07-2026 05-07-2026 06-07-2026 07-07-2026 08-07-2026 09-07-2026 10-07-2026 11-07-2026 12-07-2026 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026 18-07-2026 19-07-2026 20-07-2026 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026 27-07-2026 28-07-2026 29-07-2026
9,365 9,401 9,438 9,474 9,510 30-04-2026 01-05-2026 02-05-2026 03-05-2026 04-05-2026 05-05-2026 06-05-2026 07-05-2026 08-05-2026 09-05-2026 10-05-2026 11-05-2026 12-05-2026 13-05-2026 14-05-2026 15-05-2026 16-05-2026 17-05-2026 18-05-2026 19-05-2026 20-05-2026 21-05-2026 22-05-2026 23-05-2026 24-05-2026 25-05-2026 26-05-2026 27-05-2026 28-05-2026 29-05-2026 30-05-2026 31-05-2026 01-06-2026 02-06-2026 03-06-2026 04-06-2026 05-06-2026 06-06-2026 07-06-2026 08-06-2026 09-06-2026 10-06-2026 11-06-2026 12-06-2026 13-06-2026 14-06-2026 15-06-2026 16-06-2026 17-06-2026 18-06-2026 19-06-2026 20-06-2026 21-06-2026 22-06-2026 23-06-2026 24-06-2026 25-06-2026 26-06-2026 27-06-2026 28-06-2026 29-06-2026 30-06-2026 01-07-2026 02-07-2026 03-07-2026 04-07-2026 05-07-2026 06-07-2026 07-07-2026 08-07-2026 09-07-2026 10-07-2026 11-07-2026 12-07-2026 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026 18-07-2026 19-07-2026 20-07-2026 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026 27-07-2026 28-07-2026 29-07-2026
Current #9,492
Change
Best #

Upgrade to Pro

Unlock 30-day and 90-day rank history charts with a Pro subscription.

Upgrade Now

Active Installs Growth

Active Installs 0,000,000+
Growth +0.0%
Peak 0,000,000

Downloads Growth

0 10 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026 27-07-2026 28-07-2026 29-07-2026
0 10 14-07-2026 15-07-2026 16-07-2026 17-07-2026 18-07-2026 19-07-2026 20-07-2026 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026 27-07-2026 28-07-2026 29-07-2026
0 10 29-06-2026 30-06-2026 01-07-2026 02-07-2026 03-07-2026 04-07-2026 05-07-2026 06-07-2026 07-07-2026 08-07-2026 09-07-2026 10-07-2026 11-07-2026 12-07-2026 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026 18-07-2026 19-07-2026 20-07-2026 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026 27-07-2026 28-07-2026 29-07-2026
0 10 20 30-04-2026 03-05-2026 06-05-2026 09-05-2026 12-05-2026 15-05-2026 18-05-2026 21-05-2026 24-05-2026 27-05-2026 30-05-2026 02-06-2026 05-06-2026 08-06-2026 11-06-2026 14-06-2026 17-06-2026 20-06-2026 23-06-2026 26-06-2026 29-06-2026 02-07-2026 05-07-2026 08-07-2026 11-07-2026 14-07-2026 17-07-2026 20-07-2026 23-07-2026 26-07-2026 29-07-2026
0 10 20 29-07-2025 10-08-2025 22-08-2025 03-09-2025 15-09-2025 27-09-2025 09-10-2025 21-10-2025 02-11-2025 14-11-2025 26-11-2025 08-12-2025 20-12-2025 01-01-2026 13-01-2026 25-01-2026 06-02-2026 18-02-2026 02-03-2026 14-03-2026 26-03-2026 07-04-2026 19-04-2026 01-05-2026 13-05-2026 25-05-2026 06-06-2026 18-06-2026 30-06-2026 12-07-2026 24-07-2026 29-07-2026
Downloads
Growth
Peak

Upgrade to Pro

Unlock 30-day, 90-day, and yearly download history charts with a Pro subscription.

Upgrade Now

Reviews & Ratings

4.9
14 reviews
Overall 98%
5
13 (93%)
4
1 (7%)
3
0 (0%)
2
0 (0%)
1
0 (0%)

Tracked Keywords

Showing 3 of 3
Keyword Position Change Type Updated
sourcecode 2 Tag 14 hours ago
syntax 33 Tag 14 hours ago
Github 83 Tag 14 hours ago

Unlock Keyword Analytics

Track keyword rankings, search positions, and discover new ranking opportunities with a Pro subscription.

  • Full keyword position tracking
  • Historical ranking data
  • Competitor keyword analysis
Upgrade to Pro

Security History

Source: WPVulnerability

No known vulnerabilities on record for Pastacode. Checked 1 hour ago.

TL;DR

AI summary of the plugin's readme

Pastacode is for WordPress site owners and bloggers who want to display source code snippets in posts, comments, and bbPress topics. It solves the problem of adding syntax-highlighted code from the editor, files, or external services like GitHub and Gist without losing highlighting when code is updated.

  • PrismJs syntax coloration
  • Gutenberg block support
  • Classic editor support
  • Insert code from file
  • Import from GitHub, Gitlab, Gist
  • Import from Pastebin, BitBucket
  • Works in comments and bbPress
  • Caches webservice responses

Frequently Asked Questions

Common questions about Pastacode

HTML CSS JavaScript PHP C C# C++ Java Sass Python SQL Ruby CoffeeScript Bash Apache Less HAML Git command line Haskell Markdown Typescript Treeview (directory structure) If you use another syntax highligther plugins, migration scripts are available :)
You can use it to display a directory structure. Use pipes, backticks and hyphens like this: root_folder/ |-- a first folder/ | |-- holidays.mov | |-- javascript-file.js | `-- some_picture.jpg |-- documents/ | |-- spreadsheet.xls | |-- manual.pdf | |-- document.docx | `-- presentation.ppt | `-- test `-- README.md
Paste these lines into your functions.php theme file: add_filter( 'option_pastacode_cache_duration', 'my_pastacode_cache_duration' ); function my_pastacode_cache_duration( $duration ) { $duration = DAY_IN_SECOND*3; // 3 days return $duration; }
7 different color schemes are included, you can switch theme under Settings > Pastacode. You can also build yours: Paste these lines into your functions.php theme file: add_action( 'wp_enqueue_scripts', 'custom_enqueue_script', 11 ); function custom_enqueue_script() { $urlofmynewscheme = get_stylesheet_directory_uri() . '/prism-okaida-willy.css'; //this is an example wp_deregister_style( 'prismcss' ); wp_register_style( 'prismcss', $urlofmynewscheme, false, '1', 'all' ); } Get inspired of the default scheme to build your schemes
Paste these lines into your functions.php theme file: //If you just want php, html, css and javascript support add_filter( 'pastacode_langs', '_pastacode_langs' ); function _pastacode_langs( $langs ) { $langs = array( 'php' => 'PHP', 'markup' => 'HTML', 'css' => 'CSS', 'javascript' => 'JavaScript', ); return $langs; } Ajax compatibility To enable Pastacode on ajax based websites, it need two steps: Turn on Legacy support in the settings panel Paste this line into your functions.php theme file: add_filter( 'pastacode_ajax', '__return_true' ); After each change on your DOM, you will have to run this javascript function: Prism.highlightAll();
Paste these lines into your functions.php theme file: //Take WordPress SVN, for example //register a provider add_filter( 'pastacode_services', '_pastacode_services' ); function _pastacode_services( $services ) { $services['wordpress'] = 'core.svn.wordpress.org'; return $services; } //Define pastabox lightbox inputs add_action( 'pastacode_fields', '_pastacode_fields' ); function _pastacode_fields( $fields ) { $fields['wordpress'] = array( // 'wordpress' or 'whatever' 'classes' => array( 'wordpress' ), // same value as the key 'label' => sprintf( __('File path relative to %s', 'pastacode'), 'http://core.svn.wordpress.org/' ), 'placeholder' =>'trunk/wp-config-sample.php', //if placeholder isn't defined, it will be a textarea 'name' => 'path_id' //these value return shortcode attribute (path_id, repos, name, user, version) ); $fields['pastacode-lines']['classes'][] = 'wordpress'; // Add ability to select lines $fields['pastacode-highlight']['classes'][] = 'wordpress'; // Add ability to highlight somes return $fields; } //Build the function to retrieve the code // "pastacode_wordpress" hook name (1st param) = "pastacode_" + "wordpress" or "whatever" add_action( 'pastacode_wordpress', '_pastacode_wordpress', 10, 2 ); function _pastacode_wordpress( $source, $atts ) { extract( $atts ); if( $path_id ) { $req = wp_sprintf( 'http://core.svn.wordpress.org/%s', str_replace( 'http://core.svn.wordpress.org/', '', $path_id ) ); $code = wp_remote_get( $req ); if( ! is_wp_error( $code ) && 200 == wp_remote_retrieve_response_code( $code ) ) { $data = wp_remote_retrieve_body( $code ); $source[ 'url' ] = $req; //url to view source $source[ 'name' ] = basename( $req ); //filename $source[ 'code' ] = esc_html( $data ); //the code !! //$source[ 'raw' ] contain raw source code. But there are no raw source code delivered by Wordpress SVN } } return $source; }

Sign In / Register

You need to sign in or register to use this feature.