August 28th, 2024

Wp2hugo: Best WordPress to Hugo migrator (written in Go)

wp2hugo is a tool for migrating content from WordPress to Hugo, converting it into Markdown files while preserving media and URLs. It is free for personal use; commercial use requires a license.

Read original articleLink Icon
CuriositySkepticismAppreciation
Wp2hugo: Best WordPress to Hugo migrator (written in Go)

wp2hugo is a tool designed to facilitate the migration of content from WordPress to Hugo, a static site generator. Its primary purpose is to assist users in transferring their WordPress sites while addressing various migration challenges. The tool converts WordPress blogs into Markdown files, which can also be utilized with other systems like Mkdocs or Jekyll. Key features include the ability to migrate posts, pages, tags, categories, and media URLs, as well as support for YouTube embeds, Google Maps, and custom shortcodes. It preserves draft statuses and allows filtering by authors, while also downloading embedded media and maintaining relative URLs. Users can install the tool either by downloading the binary from the releases page or by building it from source using Git. Additionally, wp2hugo is available through various package managers. The project has successfully implemented its goals, including the migration of diverse content types and the handling of embedded content. While the tool is free for personal and non-commercial use, a license is required for commercial applications. For further details, users can refer to the wp2hugo GitHub repository.

- wp2hugo facilitates migration from WordPress to Hugo.

- It converts content into Markdown files for use with other systems.

- The tool supports various media and maintains URLs during migration.

- It is available for installation via binary download, source build, or package managers.

- Commercial use of the tool requires a license.

AI: What people are saying
The comments on the article about wp2hugo reveal various user experiences and opinions regarding content migration from WordPress to Hugo.
  • Several users recommend using WordPress's JSON API for migration, citing better reliability and data preservation.
  • There is a desire for a user-friendly GUI application to simplify the process of generating static sites.
  • Some users share their personal experiences with alternative migration tools, indicating mixed results.
  • Concerns are raised about the licensing implications for commercial use of the generated content.
  • Users express varying levels of familiarity with Hugo and its ecosystem, highlighting the complexity of the tech landscape.
Link Icon 14 comments
By @woodruffw - 8 months
From personal experience: if you’re looking to migrate from WP, I’d strongly recommend just extracting your posts via WordPress’s JSON API. I looked at several of these tools while planning a lift of a large blog to Hugo, and none of them ultimately worked as well as a small one-off Python script that pulled from the JSON API.

(Pulling from the API also means you won’t have to inject any code into your current WP instance.)

By @WaitWaitWha - 8 months
What I would like to see is a local GUI app that generates a static site.

I like Hugo, Gatsby, Ghost, Jekyll, and alike, but ever try to explain how to manage it to a machinist?

If there is one out there, please let me know.

By @cyp0633 - 8 months
Using WordPress Export may lose some data, such as respondents' user agent. WordPress REST API has been more reliable in my opinion, and I've successfully used it to transfer the comments to Artalk.
By @raudette - 8 months
Last year, I moved my small WordPress blog (~100 posts) to Hugo, and tested a couple of these - I can't remember if I tried Wp2hugo, but ended up using wordpress-export-to-markdown ( https://github.com/lonekorean/wordpress-export-to-markdown ).

I probably could have tweaked it for my own purposes, but with only 100 posts, I just reviewed every one. It probably took me a few evenings to get everything looking right following the conversion.

By @cyri - 8 months
By @notpushkin - 8 months
Dubious claim of best aside...

This is licensed under CC BY-NC-SA 4.0. How does it apply here? If I migrate my commercial blog, will the license apply to generated contents?

By @mrdoornbos - 8 months
This funny because I want to go in the opposite direction.
By @dncornholio - 8 months
Does this works with any other theme than PaperMod? It looks like the theme is hardcoded in this importer. It seems to also overwrite files in this theme instead of making use of the layouts folder?
By @scoot - 8 months
"Best" in the subjective opinion of @todsacerdoti. I didn't think editorialising titles was allowed.
By @a1o - 8 months
This is actually useful thing for me, I need to migrate a blog I have in a WordPress instance to a static page so I can host it on GitHub pages or something that is less expensive than the server I have WordPress going. Thanks
By @binary132 - 8 months
It’s kind of sad how I’ve gotten to the point where instead of saying to myself “oh boy, another X / Y / Z lang project!” I just sigh, grimace, and wonder why the tool matters to the end result. At least it doesn’t have a name that somehow awkwardly incorporates “go”.

Edit: wait a sec

By @jjordan - 8 months
Me: 'What the heck is Hugo? Never heard of it'

checks repository

11 years old, 77k stars.

The tech world is too big.

By @fortyseven - 8 months
Well, if it's written in Go it must be super special.