I recently moved a special business from Thesis 1.8.x to the Genesis Framework. And during the examination of before v. after, realized that thousands upon thousands of titles, meta descriptions and keywords previously stored by Thesis were no longer being referenced.
Genesis has similar features for SEO metadata, but unfortunately there is no related ‘migration tool’ for accessing and/or moving data that is otherwise stored in custom field format i.e. WordPress’s wp_postmeta table. Depending on how big the site is, this could potentially wind up one heck of a copy/paste project.
Fortunately, however, touching WordPress’s database directly is an easy task; it’s generally nothing more than MySQL queries. Hence, without further ado, here are the steps for moving Thesis post metadata into the corresponding fields in Genesis …
Back up the database!
Query the wp_postmeta table and jot down record count. I suggest this not because it’s absolutely necessary, but for keeping a simple audit trail of database changes.
SELECT * from `wp_postmeta` WHERE `meta_key` like "%thesis%";
Note punctuation might change slightly depending on the interface.
Turn Thesis titles, descriptions and keywords into Genesis titles, descriptions and keywords. Instantly!
Just run the following SQL, making sure to change “yourdatabasename” beforehand.
UPDATE wp_postmeta SET meta_key = replace(meta_key, 'thesis_description', '_genesis_description');
UPDATE wp_postmeta SET meta_key = replace(meta_key, 'thesis_title', '_genesis_title');
UPDATE wp_postmeta SET meta_key = replace(meta_key, 'thesis_keywords', '_genesis_keywords');
Delete remaining Thesis references from wp_postmeta. This is optional, but useful for verifying counts/changes in the table.
DELETE FROM wp_postmeta WHERE meta_key = 'thesis_thumb';
DELETE FROM wp_postmeta WHERE meta_key = 'thesis_thumb_height';
DELETE FROM wp_postmeta WHERE meta_key = 'thesis_thumb_width';
DELETE FROM wp_postmeta WHERE meta_key = 'thesis_post_image_horizontal';
DELETE FROM wp_postmeta WHERE meta_key = 'thesis_post_image_vertical';
DELETE FROM wp_postmeta WHERE meta_key = 'thesis_post_image';
DELETE FROM wp_postmeta WHERE meta_key = 'thesis_robots';
Crack open a cold one because you just saved yourself an entire day of cutting and pasting custom field data. Not an optional step, by the way.
MG signing off (when there’s a will there’s a way, especially when the ‘way’ is just one final step)