# Switching from Jekyll back to WordPress

- Link: https://cagrimmett.com/2020/11/11/switching-from-jekyll-back-to-wordpress/
- Published: 2020-11-11T14:46:26-05:00
- Author: Chuck Grimmett

I [set up this blog on WordPress in 2008](https://cagrimmett.com/miscellaneous/2008/06/22/o-brave-new-blog-that-has-such-posts-in-it/).
In 2015 I [moved it to Jekyll](https://cagrimmett.com/development/2018/01/21/website-rebuild-and-revival/)
and back filled those old posts in 2018. Now I’m back on WordPress with the entire
archive. Why? I want to post more and WordPress is more conducive to that.

With Jekyll I had to create a new markdown file with all of the yaml front matter
I wanted and my automated templates were never quite right, then I had to get the
Jekyll site running to preview the post (running the inevitable Jekyll and gem upgrades
and troubleshooting issues with some plugin that broke), then run the custom build
process I made to commit the changes, push them to Github, build the site, then 
deploy the changes to S3 and Cloudfront with [s3_website](https://github.com/laurilehmijoki/s3_website),
which is no longer being maintained. It was “rickety as hell” as an old family saying
goes.

With WordPress, [Pressable](https://pressable.com) keeps core up to date for me,
so I just open the site, write the post, and click publish. No messing around with
build tools, no finicky yaml templates, and no annoying Ruby and Java dependencies
to fight with.

Also, with WordPress, basic things like Search and Category Archives are available
by default instead of something you need to hack on. The Plugin ecosystem is much
better, too.

The Jekyll site build and [all the tools I built around it](https://github.com/cagrimmett/jekyll-tools)
was a fun project, but I’m glad to be back on WordPress. I recently [started working at Automattic](https://cagrimmett.com/news/2020/03/28/goodbye-crash-howdy-automattic/),
which of course played a role in my decision to switch back, but I had planned to
make the switch long before I had applied.

The speed of the 100% static Jekyll site served via Cloudfront was slightly faster
than this WordPress site, but the difference isn’t big enough to matter to me. The
Pressable CDN and object caching is pretty dang fast, and as I said above, I care
more about being able to update the site faster and easier than I could with Jekyll.

## Getting started

I had big ambitions for this project: I wanted to build a new theme from scratch
adhering to the [WordPress-Extra](https://github.com/WordPress/WordPress-Coding-Standards)
ruleset for PHPCS and the starter theme my team uses. I kept putting it off, preferring
to be offline when not working. I was itching to get my site migrated, so I decided
to modify [an existing theme](https://wordpress.com/theme/wilson) with a child theme
and focus my energy on the migration.

## Migrations

I essentially combined three sites into one.

 * Old WordPress posts: I’m a digital hoarder, so I still have the database for 
   my 2008 WordPress site. I loaded it up in a local instance, ran some upgrades
   so it would work with WordPress 5.5, and then used the typical WordPress WXR 
   files to import them to the new site. I temporarily put my old `/wp-content/uploads/`
   folder on the server hosting cagrimmett.com so that the import would also pull
   in the featured images.
 * Microblog posts: cagrimmett.com was still live and I keep WordPress up to date
   there
 * Jekyll posts: I heavily customized my Jekyll RSS feed to include all kinds of
   extra metadata that it normally wouldn’t. I then used the excellent [WP All Import Pro](https://www.wpallimport.com/)
   to parse the XML and map it to WordPress fields and download and import the media.
    - _Attempting to do this and getting stuck? Shoot me an email and I’ll do what
      I can to help!_

## Reading list

I built out a cool reading list feature in Jekyll using [yaml data files](https://jekyllrb.com/docs/datafiles/)
and a template that grouped the books I read by year and displayed the count. I 
was able to rebuild it pretty quickly with a custom post type, custom fields, and
two queries: One to group the books by year and sort by date read, and the other
to display the counts.

Check out the [reading page](https://cagrimmett.com/reading/), my favorite page 
on the site!

## Redirects

I thought I’d have a big issue with redirects, but with some careful planning about
95% of old links _just work_.

By going back to the old databases from existing WordPress sites, I was able to 
use existing post IDs, which is great because my old links used the post ID permalink
structure. Post ID permalinks redirect to the post by default, even if you have 
a different permalink structure.

For the Jekyll posts, I was able to match the permalink structure I had on the Jekyll
site, category/year/month/day/slug, so those work, too. The only issue I ran into
is that I had some uncategorized posts in Jekyll and Jekyll leaves uncategorized
out of the permalink while WordPress doesn’t. So I installed the [Redirection plugin](https://wordpress.org/plugins/redirection/)
to add some redirects for those and monitor 404s.

## Ongoing issues

I do have a few issues left to clean up:

 1. Code blocks with the Rouge syntax highlighter I used in Jekyll are a bit garbled.
    They need some styling to make them pretty again.
 2. JavaScript embeds in posts don’t work. I had a bunch of d3.js tutorials with interactive
    examples that don’t work right now. As a stop-gap I’ve linked to the old Jekyll
    version that is still accessible on S3, but I need to go through and fix those.

I plan to eventually build out my own theme from scratch and I want to build some
of my own [custom blocks](https://developer.wordpress.org/block-editor/) for a few
ideas I have.

But first, back to regular blogging.

## Comments

### By: Johnathan Mark Smith

- Link: https://cagrimmett.com/2020/11/11/switching-from-jekyll-back-to-wordpress/#comment-26292
- Published: 2022-12-27T14:51:15-05:00

I am having getting this blogs moved

Loading...
