WordPress has many useful features, one being SEO management. If you’ve ever setup a WordPress site and installed the Add Meta Tags plugin and wish to migrate to Yoast SEO (or to anything for that matter), this step by step will help you keep all your data.
- Login to your wp_admin
- Install the Yoast SEO plugin (do not activate yet)
- Install MySQL Workbench or another MySQL admin tool.
- Login to your database
- If you are using MySQL Workbench, run a Data Export on the wp_postmeta table just in case something goes wrong.
- In the query console type then click the execute button:
SELECT DISTINCT meta_key FROM <dbname>.wp_postmeta
WHERE meta_key like ‘_amt_%’
ORDER BY post_id DESC; - You will now have a list of all the tags you use with “Add Meta Tags” plugin. Write these down.
- Clear the query console and type then click the execute button:
Update <dbname>.wp_postmeta
SET meta_key = ‘_yoast_wpseo_title’
WHERE meta_key = ‘_amt_title’;Update <dbname>.wp_postmeta
SET meta_key = ‘_yoast_wpseo_metadesc’
WHERE meta_key = ‘_amt_description’;Update <dbname>.wp_postmeta
SET meta_key = ‘_yoast_wpseo_metakeywords’
WHERE meta_key = ‘_amt_keywords’; - All your fields have now been migrated.
- Go back to your wp_admin and deactivate “Add Meta Tags”
- Activate Yoast SEO
- Enjoy the new SEO administration.
*Tip: If you are wanting the keywords field to add your own keywords.
- From the SEO menu on the left, click Titles & Metas
- Click the Other tab
- Check the box next to Use meta keyword tag
Other resources: http://www.drewslair.com/2015/01/converting-meta-descriptions-yoast-seo/