Migrating from Blogger to Hugo

This article walks through the process of migrating from Blogger to Hugo, from exporting data and restructuring content to the final publishing step.
Why Move from Blogger to Hugo?
Blogger is practical when you want to start a blog quickly. Publishing is simple, and the setup overhead is minimal. But as the number of posts grows, the requirements usually change as well. You may want a cleaner content structure, better performance, more control over the theme, and a more reliable backup workflow. At that point, Hugo becomes a strong option because:
- Hugo generates fast static sites.
- All content is stored in files, so backups are straightforward.
- Folder structure and templates are much more flexible.
- Local development is easier to manage.
- Publishing can be integrated with Git and static hosting platforms.
What to Prepare
Before starting the migration, prepare the following:
- A Blogger export file in XML format.
- Hugo installed on your local machine.
- A Hugo project repository.
- A list of posts, labels, and important pages you want to keep.
- A URL plan if you want to preserve already indexed links. If the old blog already gets traffic from search engines, the goal is not only to move the content but also to preserve important metadata and URL structure to reduce SEO impact.
1. Export Content from Blogger
Open the Blogger dashboard, then go to:
Settings -> Manage blog -> Back up content -> Download
Blogger will generate a single XML file containing posts, pages, comments, labels, and other metadata. Keep this file safely because it becomes the main source for the migration.
It is also a good idea to create additional backups:
- copy the list of static pages,
- document important widgets,
- save the old Blogger theme if you still need it as a reference,
- note the most visited article URLs.
2. Create or Prepare a Hugo Project
If you do not already have a Hugo project, create one first:
hugo new site blog-baruThen choose and install a theme, and start the local server:
hugo serverGet familiar with the main Hugo structure early:
content/for posts and pages,layouts/for templates,static/for static assets,assets/for the resource pipeline,config/orhugo.tomlfor site configuration. If you already have an active Hugo project, this stage mainly means making sure the content structure is ready to receive the migrated posts.
3. Convert Blogger Posts to Hugo Format
The Blogger XML file cannot be used directly as Hugo content. You need to convert it into Markdown files, usually in a structure like:
content/posts/post-name/index.mdor
content/posts/post-name.mdA minimal Hugo content file usually contains front matter and the article body:
---
title: "Article Title"
date: 2026-06-21
draft: false
tags: ["Blogger", "Hugo"]
categories: ["Tutorials"]
---The parts that usually need to be mapped from Blogger to Hugo are:
- post title,
- publication date,
- labels converted into
tags, - old permalink,
- HTML or Markdown body content,
- images embedded in the article. If you use your own migration script, make sure the output is consistent and does not mix multiple front matter styles.
4. Clean Up the Front Matter
After conversion, do not assume every post is ready to publish immediately. Migrated front matter usually still needs cleanup. Common Hugo fields include:
titledatelastmoddraftdescriptiontagscategoriesaliasesurlExample:
---
title: "Migrating from Blogger to Hugo"
date: 2026-06-21
lastmod: 2026-06-21
draft: false
description: "A tutorial on migrating content from Blogger to Hugo."
tags: ["Hugo", "Blogger", "Tutorial"]
categories: ["Tutorials"]
aliases: ["/2023/07/migrasi-dari-blogger-ke-hugo.html"]
---The aliases field is especially useful if you want visitors opening an old URL to be redirected to the new one.
5. Handle Old URLs
This is one of the most commonly overlooked parts. In Blogger, article URLs usually look like this:
/2023/07/article-title.htmlMeanwhile, Hugo often uses a shorter slug, for example:
/article-title/If you change every URL without a redirect strategy, search traffic and old backlinks can drop. Some approaches you can use:
- add
aliasesto individual posts, - preserve the old structure with
url, - configure redirects at the hosting layer,
- prioritize redirects for the most visited articles. For an established blog, preserving permalinks matters more than simply making the URLs look cleaner.
6. Review Images and Media
Content migration almost always leaves work to do on images. Many Blogger posts use image links from Blogger’s CDN or still contain old HTML attributes. Check the following:
- whether the images are still accessible,
- whether the image URLs are still valid,
- whether the image files are too large,
- whether the
altattributes are filled in, - whether the images should be copied into the local Hugo project structure. The safest strategy is usually:
- download important images,
- place them in each post folder or in
static/images/, - update the references inside the content. That way, you are not overly dependent on external image hosts for older content.
7. Clean Up Blogger HTML
Blogger often produces noisy HTML, such as:
- nested
<span>tags, - long inline styles,
- `` tags used for simple formatting,
- presentational attributes that are no longer needed,
- markup copied from the visual editor. If you leave all of it untouched, the article may still render, but it becomes harder to maintain. After conversion:
- simplify paragraphs,
- convert what can become plain Markdown,
- clean up headings,
- review ordered and unordered lists,
- remove unnecessary inline styles. If an older article is genuinely complex, it is still acceptable to keep parts of it as HTML as long as the rendering remains correct. The main goal is consistency and maintainability.
8. Migrate Important Pages Besides Posts
Do not focus only on articles. A Blogger site often also has pages such as:
- About,
- Contact,
- Table of contents,
- Disclaimer,
- Privacy policy,
- special pages for downloads or profiles.
Those pages should also be moved into Hugo, usually under
content/according to the site structure. Make sure the navigation menu in the Hugo theme points to the new pages correctly.
9. Test the Migration Locally
Before deploying, run Hugo locally and inspect the result carefully. Things to check:
- whether all posts appear,
- whether publication dates are correct,
- whether tags and categories are recognized,
- whether internal links still work,
- whether images display properly,
- whether the table of contents, shortcodes, or code blocks remain clean,
- whether older posts with custom URLs are redirected correctly. This step takes time, but it is the part that prevents bigger issues after the site goes live.
10. Deploy to Hosting
Once the local result is clean, you can build the site:
hugoThe output is usually generated in the public/ folder. From there, the site can be published to platforms such as:
- GitHub Pages,
- Cloudflare Pages,
- Netlify,
- Vercel,
- a private server. If your workflow is Git-based, deployment becomes much simpler and easier to repeat.
Common Challenges
Some common issues during migration from Blogger to Hugo are:
- Old article HTML is too messy.
- Images still depend on the old host.
- Old URLs are not preserved.
- Blogger labels are inconsistent.
- Article metadata is incomplete.
- The Hugo theme does not yet support all display needs. Because of that, migration should also be treated as a content cleanup process, not just a file transfer.
A Safer Migration Strategy
If you have many articles, do not migrate everything at once without verification. A safer approach is:
- migrate a subset of posts first,
- review the result,
- refine the conversion script,
- continue with the next batch,
- run a final audit before full publication. A staged approach usually reduces rework.
Conclusion
Migrating from Blogger to Hugo gives you more control over content, performance, and publishing workflow. But a good result does not come from export and import alone. The important work is in cleaning up content structure, mapping old URLs, and verifying the final output. If the migration is done carefully, Hugo can become a much stronger long-term foundation for managing a blog.