Hugo a static site generator written in GoLang: https://gohugo.io
This repo is based on https://github.com/benbalter/wordpress-to-jekyll-exporter
- Converts all posts & pages from WordPress for use in Hugo
- Processes shortcodes
- Converts all
post_content
to Markdown Extra (using Markdownify) - Converts all
post_meta
and fields within thewp_posts
table to YAML front matter for parsing by Hugo. - Converts all Advanced Custom Fields into front matter in your posts. May be duplicate data, but new keys.
- Metadata is converted markdown.
- All internal URls are converted to relative URLs.
- Exports private posts and drafts. They are marked as drafts as well and won't get published with Hugo.
- Generates a
config.yaml
with all settings in thewp_options
table
It's been my experience that it just runs faster. Server speeds and setup can vary wildly. Some hosts have very short max timeouts that will cause the export to fail. Using CLI takes most of the headache away.
You should be running the website on a local WordPress installation.
- Download this repo as a zip file in the upper right hand corner of this page.
- Place plugin zip in
/wp-content/plugins/
folder - Unzip the file
- Activate plugin in WordPress dashboard
- In a termainal navigate to your WordPress installation to begin using WP-CLI
- Type in your command. See Command-line Usage below.
wp bugo <subcommand> <directory>
Subcommand
- export - export pages, posts and media library
- posts - exports only posts & pages
- media - exports the media library (preserved directories)
- originals - exports only the original media from the media library
- all - exports posts,pages and the media library
Directory This is your target directory. A new folder containing the export will be created here.
# wp bugo all ~/Desktop
Exports posts, exports posts,pages and the media library to ~/Desktop/wp-hugo-<website>
- First Release