Transmorphing a WordPress blog into Sveltekit with Markdown

WordPress is really one of the best tools one could wish for in a blog. I loved working in WordPress for years and owe a great debt to the community for essentially training me in a new career. My only problem with WordPress is that I no longer work in WordPress. Because I no longer was keeping up with what was going on in the WorldPress world updating and maintaing a blog where I was only writing an article or two every once in a while became a chore. Hosting seemed riduculously expensive especially compared with some of the cheaper alternatives like Netlify (free) and rebuilding my stylesheets and redeploying them next to impossible due to severe the techincal debt that I manged to incur by regularly changing task runners (first grunt, then gulp, then webpack).

Below is a list of problemes I ran into, descisions made, an overall run-down of the whole process and general feedback.

Extracting content from WordPress.

This is not my first adventure migrating from WordPress to … I have also experimented with other solutions most notably Gatsby where this article by Tania Rascia was exceedingly helpful. In short I exported the xml from WordPress using Tools > Export and then used Exitwp to transform the xml into markdown. Please note that Exitwp is pretty ancient and has been archived on Github so if you have any problems you are on your own. There will likely be some formatting issues with the resulting posts. I found the spacing to be particularly annyong and used the find/replace in VS Code to correct most of this using Find : ^(\s)*$\n Replace : \n with Use Regular Expression selected.

No more categories

There are two basic taxonomies used by WordPress: categories and tags. The difference between them is that categores are hierarchical whereas tags are flat. This means one can have subcategories but not sub-tags. A stucture such as Animals > Pets > Dogs > Schnauser would then make sense but since I never dealt with such obvious hierarchy on my blog it just served as a point of confusion. Do I create a stucture such as CSS > Postcss ? But then Javascript > Postcss would be equally appropriate so where do I draw the line. It seemed easier to hava single taxonomy and tags suited my purpose much more effectively.

Changing the url structure

Old url structure

https://www.kirstencassidy.com/tag/cheat_sheets/

Preferred url structure

https://www.kirstencassidy.com/tags/cheat_sheets/

My reason for doing this is that https://www.kirstencassidy.com/tags/ seems to make more sense.

No more more tag or shortcodes

In the WordPress text editor you can use a <!-- more --> tag to denote text that is beyond the official Exceprt length. The Excerpt is the text that is often shown in themes on a blog roll where you might see The title, a thumbnail image and an introductory paragrpch followed by a link to the full post that says something like Continue reading…