How to migrate an older Hugo site to the latest version of Hugo

Are there any resources on upgrading hugo? It’s been a while since I used Hugo, my current folder structure (on the left) seems quite different compared to the current folder structure (on the right).

How can I upgrade to the latest version while keeping the url structure intact?
ex. https://asunar.github.io/2019/01/15/Remote-Work/
Thanks.

The structure on the left is your repository, the structure on the right is your website under public. I think first step would be to “just run hugo” in your repo and see what happens inside of the public folder. There might be problems with your templates if you come from a very old hugo. The CLI will post errors, just copy paste them. But from your picture - no issue there, that’s two different locations. Of course you upload only the contents of the public folder to your website root.

Thanks, that makes sense I was wondering why there were no markdown files in my repo.

I’m getting the following. I will checkout the docs for layout lookup rules.
> $ hugo server -D
> Building sites … WARN 2020/06/25 06:16:09 found no layout file for “HTML” for kind “taxonomy”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
> WARN 2020/06/25 06:16:09 found no layout file for “HTML” for kind “taxonomy”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
> WARN 2020/06/25 06:16:09 found no layout file for “HTML” for kind “home”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

1 Like

Can you please post a github repo of your website? The home warning (last WARN) should go away if you copy the list template from layouts/_default into layouts/home.html (copy, not move). The others I would need to see the structure of your theme to know.

I’m following this conversation with great interest, because I’m also trying to update our website from 0.30 to newer versions.

In addition to the standard message –found no layout file for "HTML" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination. – I’m seeing an empty home page. My sense is that the tag {{% index-section-list %}} perhaps no longer does what it used to?

A minimal repro is at

I’m also having this problem, and it doesn’t seem like it was really solved for anyone here? I noticed in my layouts folder I only have partials, there is no _default but I’m not sure if that’s why I’m only getting Page Not Found when I try to run hugo server.

The process for migrating from an older version to a newer version will vary based on versions, obviously, but also the structure and layouts in your existing site.

This process may be difficult if you are a casual or infrequent user. If you post a link to the public repository for your project, someone on this forum may be able to help you.

We will also need to know the version from which you are migrating.