MySQL Search and Replace to the rescue

I have been using Crayon Syntax Highlighter WordPress plugin since the inception of this blog.
While examining the number of request made by this blog via Firebug, I discovered that Crayon Syntax Highlighter alone made over 5 GET request which I deem too much for a mere code highlighter.
I finally decided to replace it with a light-weight alternative “Syntax Highlighter for WordPress

The hurdle I had to face next was, editing previously published posts and replacing the former highlighter plugin syntax to the new highlighter syntax.

To highlight a code using Crayon, you need to wrap the code with <pre class=”attributes” title=”something”>…</pre> while Syntax Highlighter for WordPress uses Mini Tags like [php]some code.. [/php]

Editing individual post and changing the highlighter syntax to the new plugin seems daunting to me. To save my time and energy, I resorted to MySQL Search And Replace.
MySQL Search and Replace WordPress plugin

To be frank, the MySQL search and replace was about 80% accurate as some post weren’t affected. I had to use Jetpack Omnisearch to search and manually edit the few unaffected post.

If you do not want to install the bulky Jetpack plugin, you can install the standalone Omnisearch plugin.

Have a nice day.

Don’t miss out!
Subscribe to My Newsletter
Invalid email address