Migrate from FigureRender

In FigureRender, lilypond fragments are surrounded by [music] and [/music] pair, but since this tag is too generic, lilypond tags have been changed to [lilypond] and [/lilypond]. Indeed one option is to change the content of all posts one by one, but there are better ways.

Via WordPress plugin

There are multiple plugins available on net, allowing search and replace for WordPress content, such as the one from Rudd-O and another from The Dead One. Please refer to their site for plugin installation and usage. However note that I haven’t used any of the plugins myself.

Via direct access to MySQL database

Inside your wordpress database (via MySQL command line or phpMyAdmin or whatever), execute these 2 SQL statements:

UPDATE wp_posts SET post_content =
    REPLACE(post_content, '[music]', '[lilypond]');
UPDATE wp_posts SET post_content =
    REPLACE(post_content, '[/music]', '[/lilypond]');

However I didn’t test this procedure very rigorously (only tried it on one of my own test sites), and won’t be held responsible for any damage caused. ALWAYS remember to backup the database before doing this! You have been warned!

As a side note, similar SQL commands can be used to migrate latex tags. FigureRender uses [math], while most other latex related plugins like LatexRender use [tex]. (This makes sense, latex isn’t just for mathematics, right?)