Hugo is great! it is the quickest static site geneartor.

wordpress is great! If you have previously write a lot via wordpress, then now you have decided to start writing using hugo, the following tools may help convert your wordpress content to hugo post FORMAT.

A few hugo community-developed tools for migrating from Wordpress to Hugo. see migrations

  • wordpress-to-hugo-exporter - A one-click WordPress plugin that converts all posts, pages, taxonomies, metadata, and settings to Markdown and YAML which can be dropped into Hugo. (I readlly have trouble using this plugin, and I encounterd problem using this export your site for Jekyll and thus cannot use Hugo’s built in Jekyll converter listed above.)

  • exitwp-for-hugo - A python script

  • blog2md - Works with exported xml file of your free YOUR-TLD.wordpress.com website.

  • wordhugopress - A small utility written in Java, exports the entire WordPress site from the database and resource (e.g. images) files stored locally or remotely. Therefore, migration from the backup files is possible. Supports merging of the multiple WordPress sites into a single Hugo one.

I have some difficulty login to vps system and install the first wordpress plugin wordpress-to-hugo-exporter, and this export wordpress for Jekyll plugin needs not command line works, I install the plugin in the wordpress administrative panel, but the plugin fails to work!

so I try blog2md with the wordpress export xml file

first export wordpress content to xml file

wordpress export

click the export menu item,

Wordpress export xml

click Download Export File

and save download file as for example ‘andbible.WordPress.2021-03-22.xml’

then have a rest, we have succesfully downloaded our wordpress posts, however the pictures are not downloaded! We will discuss this issue later!

now goto blog2md github page, read the documents since I am migrating from WordPress the command to be used is

1
node index.js w your-wordpress-backup-export.xml out

if you have not installed node, please goto nodejs and download node and follow the instructions there.

first clone the blog2md codes:

1
git clone https://github.com/palaniraja/blog2md.git

then copy the wordpress exported xml file to the new git-clone created directory blog2md, type the command above:

1
node index.js w your-wordpress-backup-export.xml out

out is the output directory.

that’s all, goto the directory to see the outputed hugo Markdown formatted files

the files should started like This

1
2
3
4
5
6
7
8
9
---
title: 'Love'
date: Tue, 08 Sep 2020 00:59:03 +0000
draft: false
tags: ['all', 'kjv', 'love']
---

For all the law is fulfilled in one word, even in this; Thou shalt love thy neighbour as thyself

with our title, date, tags, the migrationg is almost done, but the images are still out there, I will handle this later.