Migrating from WordPress to Hugo: A Complete Guide

After years of running my blog on WordPress, I finally made the switch to Hugo and GitHub Pages. The result? A blazingly fast, version-controlled blog that costs nothing to host. Here’s how I did it and what I learned along the way. Why I Made the Switch WordPress is powerful, but over time I found myself frustrated with: Performance issues: Even with caching plugins, my site felt sluggish Security concerns: Constant updates and vulnerability patches Hosting costs: Paying monthly for shared hosting Database complexity: Backing up and managing MySQL databases Plugin bloat: Each feature required another plugin Hugo offered a compelling alternative: static site generation, Git-based workflow, and free hosting on GitHub Pages. ...

February 9, 2026 · SarCoptU

Hugo Cheatsheet

Hugo Cheatsheet A quick reference for the most useful Hugo commands, flags, and tips. Core Commands Command Description hugo new site <directory> Create a new Hugo site in the specified directory. hugo new <section>/<filename>.md Add a new content file (e.g., hugo new posts/my-first-post.md). hugo server Run a local development server with live reload (defaults to http://localhost:1313). hugo server -D Include drafts (draft: true) when serving locally. hugo Build the site for production (outputs to public/). hugo -d <output-dir> Specify a custom output directory for the generated site. hugo --minify Minify HTML/CSS/JS during the build for smaller payloads. hugo --gc Run garbage collection to remove unused files from the cache. hugo version Show the installed Hugo version. hugo env Display environment variables (useful for debugging). Useful Flags & Options Flag Purpose -s, --source <path> Set the working directory (useful when running from outside the site root). -b, --baseURL <url> Override the site’s base URL (good for staging environments). -t, --theme <name> Force a specific theme (overrides the one set in config.toml). --cleanDestinationDir Delete everything inside the destination folder before building. --ignoreCache Skip the cache and reprocess all files (helps when you suspect stale data). --verbose Show detailed processing information (great for troubleshooting). --logLevel <level> Control log output (debug, info, warn, error). Content Management Tips Front Matter ...

January 16, 2026