Moving from wordpress and joomla to hugo
Why?
Having used both for years, I faced some unsolved issues, slow website rendering, and continuous work to maintain the websites, checking for updates and applying them. Moving from one server to another is painful and sometimes impossible. Then I discovered hugo . A very lightweight static website generator. No need for an sql database, it’s html based, so it’s incredibly fast and doesn’t require a high end server to host.
What you need to make it work?
You can run it on windows, Linux and even android through termux (it works, but I don’t recommend it. You may write your note on your phone but editing content and publishing it is way easier on pc). You also need to learn how to :
- edit configuration,
- add themes,
- add content, etc…
A good text editor like notepad++ or better vscodium.
It takes some time to get it done but it’s not really hard. And the result will bluff you.
How to do it?
Moving from either cms can be done via a dedicated tool to the new hugo format. But I decided to make it by hand (even though I had about 120 articles in one joomla site, 30 in one another and 20 in a WordPress site). This way I’ll have a chance to learn more and get time to check and clean up some old articles.
Basics in hugo
First, you need to install hugo (Linux) or download it and extract it in one of your windows system paths (or extract it anywhere you want and add its path to the system path).
Create your website skeleton
hugo new site blog
Add a theme from
Hugo themes You’ll find in every theme page how to install it, how to use it, you can check exemple site for more details.
Begin adding content
hugo new posts/helloworld.md
For organising purposes, you may use subfolders corresponding to categories.
You’ll find your new created post in the content folder. Open it using your preferred text editor or better use a markup editor. Here, you’ll have to learn more about markup format. In the first part of the file you can see some information about your newly created post. Change what you want. Add the content of your blog post and save it.
Check the website
In console, run
hugo server
And open localhost:1313 in your browser
You’re up and ok
Publish your website
Be sure to set draft to false to the posts you want to have online or comment it using #. Open config.toml, change the settings according to your needs, save it and run
hugo
Then upload the content of the public folder to the root of your public_html of your site.
Comments