A client with a WordPress site containing thousands of articles has been running SlimSEO. They need to switch back to Yoast without losing their existing meta data, so I built a simple plugin to do this one-shot task.
What it does
Slim SEO stores all its metadata as a single serialised array per post or term. Yoast splits the same information across individual database rows. This plugin translates between them, including rewriting Slim SEO’s {{ post.title }} template syntax into Yoast’s %%title%%, and resolving image URLs to the media library attachment IDs Yoast needs.
It also handles two things a naive field-copy would miss. If your site ran Yoast before switching to Slim SEO, its old metadata is still in the database. Reactivating Yoast brings that stale data back, and much of it lives in fields Slim SEO has no equivalent for, so a migration can’t overwrite it. On a site with thousands of posts, that means thousands of old Open Graph titles silently overriding your migration on every social share. The plugin clears that out.
Like most SEO plugins, Slim SEO also generates a meta description from post content when you haven’t written one. Yoast leaves it empty by design. Without a settings change, more than half your pages would lose their meta description entirely. The plugin handles that too.
Back up your database first. The --reset flag is destructive, and whilst the plugin uses Yoast’s own public APIs rather than touching the database directly, a backup gives you peace of mind. For a full production runbook including rollback steps, see the plugin documentation.
Install and activate
Clone the plugin into your plugins directory. The directory name must be exactly slimseo-to-yoast:
cd wp-content/plugins
git clone git@github.com:headwalluk/slimseo-to-yoast.gitThen activate both Yoast and the migration plugin:
wp plugin install wordpress-seo --activate
wp plugin activate slimseo-to-yoastNote: Yoast must be active before you run the migration.
Run the migration
Start by checking what the plugin will do:
wp slimseo-to-yoast statusThis shows you how many posts, terms, and settings it found on each side.
Next, do a dry run to see what will change:
wp slimseo-to-yoast migrate --dry-run --resetRead the output carefully. The --reset flag clears stale Yoast data before the migration, which is necessary but destructive. If you’re not comfortable with what you see, stop here.
When you’re ready, run the actual migration:
# This is the meat-and-potatoes work.
wp slimseo-to-yoast migrate --resetThis rewrites your metadata in batches. On a large site it may take a few minutes.
Then all we need to do is configure Yoast to match Slim SEO’s front-end behaviour, and re-index Yoast.
# Configure Yoast
wp slimseo-to-yoast configure
# Re-index Yoast .This process can take a long time on large sites
wp yoast index --reindexTidying up
Once the migration is complete and you’ve verified the data in WordPress, deactivate and delete Slim SEO:
wp plugin deactivate slim-seo
wp plugin delete slim-seoThen deactivate and delete the migration plugin itself:
wp plugin deactivate slimseo-to-yoast
wp plugin delete slimseo-to-yoastThe migration plugin is a one-shot tool with no admin UI, no front-end output, and no hooks. Once you’re done with it, there’s no reason to keep it installed.
