Migration from SyntaxHighlighter to Pastacode

Migration from SyntaxHighlighter to Pastacode – In recent months the Indonesian web design tutorial website has used two plugins for syntax highlighting or for writing program code in posts. That means that it is very burdensome because it uses too many scripts and is a waste of time, but due to time constraints, they don’t really care about using the two plugins at once. However, because they want to improve their performance today, they finally took the time to make a few changes, this is part of the redesign process that is planned to be carried out early this year. We had to choose one of the two syntax highlights, and finally chose Pastacode.

Since the establishment of this website we have only used one plugin to write syntax, namely SyntaxHighlighter Evolved by Alex Mills (Viper007Bond), for almost a year we have used this plugin to write HTML, CSS, Javascript, PHP, and even MySQL and Java code snippets in tutorials. -webdesign.com. However, the obstacle that arises is that the steps are a bit complicated if we want to write code snippets, where to write code snippets we have to change the editor to text mode, cannot be in visual mode, then write the manual format.


Finally after almost two years of TWD running, we decided to use Pastacode as well in addition to SintaxHighlighter Evolved. At first, we saw the jquery plugin, PrismJS, which is also used on the Dabbblet.com website, and apparently also used by other well-known blog sites such as Smashing Magazine, CSS-Tricks, Alist Apart, WebPlatform.org and TypePlate. Then we searched for PrismJS based syntax highlighter plugin and finally found this Pastacode.

With Pastacode, we only need to click on the icon (P) in the visual editor, and choose a programming language, then paste the program code, it will form itself later. How to use Pastacode is easier than SyntaxHighlighter in our opinion.

Problems & Obstacles

However, a problem arises, namely the result of the code generated from Pastacode is not the same as SyntaxHighlighter, for example, writing the cssSyntaxHighlighter code is quite different.


while the pastecode looks like this and is generated directly by the GUI, no need to type your own format in text mode in the wordpress editor.


It is very long and inconvenient if you have to make changes to every article that has been written with SyntaxHighlighter from the wp-admin page, because it will take time, almost a hundred posts that must be edited (very less work if you have to edit one by one).

Also Read:

PHP : Migration from Mysql Extension to PDO
Review and How to Migrate To Twitter Bootstrap 3
Migration From One Domain to a New Domain While Maintaining SEO
Finally we decided to change directly with mysql query to replace the code created with SyntaxHighlighter to match the Pastacode format.

The query can be downloaded at the link below, the query code looks quite a lot because it has changed quite a lot, namely HTML, CSS, JS, PHP, Java and MySQL codes. Because that’s the programming language that is widely used in TWD.


So that previously only used SyntaxHighlighter, then used SintaxHighlighter and Pastacode simultaneously, and now only uses one, namely Pastacode.

If you have a similar problem, where you have to migrate from SyntaxHighlighter to Pastacode or to another plugin with a different format, maybe you can use the script to be executed in PHPMyAdmin or anywhere that can execute SQL scripts, it can be edited according to your needs/syntax format.

Actually there is a plugin for find & replace in this case, but for speed and to make sure that the code used is correct, we decided to just use the script and execute it ourselves in PHPMyAdmin.

I hope this helps.