Wordpress To Hugo Exporter

screenshot of Wordpress To Hugo Exporter

Hugo is static site generator written in golang. Wordpress is a tool for remote access to your server ;-) Contributions welcome!

Product Analysis: WordPress to Hugo Exporter

Overview:

WordPress to Hugo Exporter is a plugin that allows users to convert their WordPress content into Markdown and YAML format for use in Hugo, a static site generator. This plugin makes it easy to migrate from WordPress to Hugo by converting all posts, pages, taxonomies, metadata, and settings into the appropriate format.

Features:

  • One-click WordPress plugin: Easily convert all WordPress content to Markdown and YAML for use in Hugo.
  • Converts all posts, pages, and settings: Ensures that all content and settings from WordPress are properly converted for use in Hugo.
  • Export what users see: Runs content through the _content filter prior to export, allowing third-party plugins to modify the output.
  • Converts post_content to Markdown Extra: Uses Markdownify to convert all post_content to Markdown Extra format.
  • Converts post_meta to YAML frontmatter: Converts all post_meta and fields within the wp_posts table to YAML frontmatter for parsing by Hugo.
  • Exports comments as part of posts: Optionally exports comments as part of their respective posts. This feature needs to be enabled manually by editing the PHP source code.
  • Exports private posts and drafts: Marks private posts and drafts as drafts in Hugo to prevent publishing.
  • Generates config.yaml: Generates a config.yaml file with all settings from the wp_options table.
  • Outputs single zip file: Outputs a single zip file containing config.yaml, pages, and a post folder with .md files in the proper Hugo naming convention.
  • No settings required: Simple one-click usage without any additional settings.

Self-hosted WordPress Installation:

  1. Place the plugin in the /wp-content/plugins/ folder.
  2. Uncomment the extension=zip.so line in your php.ini file.
  3. Activate the plugin in the WordPress dashboard.
  4. Select "Export to Hugo" from the Tools menu.

Usage without SSH Access (wordpress.com or other hoster):

  1. Login to the backend of your WordPress instance.
  2. Create an XML export of the whole blog and download the XML file.
  3. Setup a local WordPress instance on your machine with the required dependencies.
  4. Install the plugin by downloading the zip file from the repository and uploading it to WP.
  5. Import the XML export into the local WordPress instance.
  6. Run the "Export to Hugo" command in the WordPress backend. If it fails, run the CLI script with memory_limit=-1.
  7. Collect the ZIP file via download or CLI script.
  8. Remove WordPress and use Hugo.

Usage with Docker:

  1. Create a Dockerfile containing all the required dependencies for the XML to Hugo conversion.
  2. Follow the instructions for self-hosted WordPress or usage without SSH access, depending on your setup.

Usage with plugins in wordpress.com instance:

  1. Download the repository as a zip file.
  2. Login to the backend of your WordPress instance.
  3. Go to the plugin section and click on "Add New".
  4. Upload the zip file of the repository.
  5. Activate the plugin.
  6. Run the "Export to Hugo" command in the WordPress backend.
  7. Collect the ZIP file via download.
  8. Copy the contents of the ZIP to your Hugo installation and enjoy Hugo.

Summary:

WordPress to Hugo Exporter is a powerful plugin that simplifies the process of migrating from WordPress to Hugo. With its one-click functionality and comprehensive conversion features, users can easily convert their WordPress content into Markdown and YAML format for use in Hugo. Whether you have a self-hosted WordPress installation or are using wordpress.com or other hosting platforms, this plugin provides clear installation instructions and usage guides to ensure a smooth transition. By eliminating the need for manual conversion and allowing for easy export and import of content, WordPress to Hugo Exporter saves users time and effort when switching between these two popular platforms.