Re: How-To and Troubleshooting
How can I export WordPress’s internal rewrite rules to an htaccess file? I’m thinking of leaving WordPress, but I’ve changed my permalink structure a few times over the years and want to keep all my urls alive.
http://codex.wordpress.org/Class_Reference/WP_Rewrite might have useful info, but I don’t know enough to make use of it. I’ve also looked at http://codex.wordpress.org/Using_Permalinks .
As an unappealing fallback, I could use a plugin to make a sitemap for each permalink scheme, then compare them and try to derive rules. This would leave out any posts whose slug might have changed if I renamed them, but there probably aren’t many of those (and maybe none that anyone linked to).
Others have asked this 8 years ago and 4 years ago with no answer. “4 years ago” seems to refer to a plugin that lets one view the rules, but I don’t see anything like that in the plugin repository.
I’m not sure I see why you need the rewrite rules. It seems all you need is a complete list of your current URLs so you can recreate them on whatever platform you move to.
Regardless, this plugin seems to allow you to view your current rules as they are stored in the database: https://wordpress.org/plugins/rewrite-rules-inspector/
via WordPress.org