For so long, I have been meaning to make my blog completely static (plain old HTML will do). No more dynamic fancy decorations for a simple blog.
The following are the steps I followed to migrate my blog from wordpress.com to GitHub pages:
Create an initial personal GitHub Page repository online.
Clone remote repository to local computer:
git clone https://github.com/username/username.github.io
- Follow the instructions
to set up Jekyll for GitHub pages locally on your computer
- Install Ruby from official sources.
- Install Bundler.
- Install Jekyll using Bundler.
Build/preview your site locally (from the root directory of your repository) before publishing posts to GitHub servers.
bundle exec jekyll serve
- Export your data from wordpress
- Go to the WP Admin tab for your blog, then go to tools and export.
- Export all content.
- Download the Exitwp tool
created by Thomas Frössman (Thank you).
- I tried several tools, this one worked the best for me.
- Follow the tool instructions.
- Import data using the Exitwp tool.
- See the build directory for the imported posts and pages.
Manual Tedious Work (get a coffee)
Build/preview your site locally at every step to check your progress.
Copy posts in the
_postsdirectory to your local Jekyll
Rename and copy pages to Jekyll top directory.
- Fix the YAML Front Matter at the top of every post.
- Get rid of extraneous unneeded variables.
- Create resources directory for linked images and docs (referred by posts)
- You can name this directory however you want.
- Download linked images and docs from wordpress servers to your resources
- This might take some time.
- Go over every post to make sure out-links are working and post images
and docs are loaded from your resources directory and not from
- This will take some time.
- Install Jekyll RSS plugin.
- Clean up your blog build configuration (
- Define site properties: blog name, author, contact …etc.
- Define build configuration: theme (minima is a good start), markdown parser, gems used …etc.
- Define default variables: so that you don’t have to define them in every post.
- Find a commenting solution.
- Disqus, GitHub Issues …etc.
Set-up URL redirects from previous wordpress.com blog.
Preview your blog locally (make sure everything looks good)
bundle exec jekyll serve
- Push changes to GitHub pages.
- Give it a couple of seconds to build your site.
Keep you Jekyll build tools updated. Check for updates every once in a while.
Other references (good reads):
Find a problem? Mistakes? Comments? File an Issue. You can reply on an existent thread related to this post, or otherwise create a new issue using the title of this post.
Alternatively, drop me a note at the address below.