Skip to content

flutter-clutter/wordpress-comments-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wp_comment_exporter

Congratulations on your decision of migrating from Wordpress to Hugo!
Oh, you haven't? Here are some reasons.

You may have already noticed the export from Wordpress is quite ugly and hard to parse.

Luckily, this fantastic community provides tome tools for this task.
The post export worked out quite well using this tool, but I struggled with the comments.

That's why I wrote my own tool for this.

The output are yaml files that can be e. g. used by Staticman.

So basically this tool takes a wordpress export and converts it to this:

(in output/my-post-id/comment-1628575290.yml)

_id: '1'
comment: 'Wow, I used to me a Wordpress comment. I\'m finally free!'
date: '2022-04-04 08:01:30'
email: christian@commenter.com
email_hash: 9b77b628098cfa13f8e96da3d03ff548
name: Christian Commenter

Requirements

You only need Docker for this.

Usage

  1. Put the Wordpress export XML files into a directory called input in the project directory
  2. Copy the .env.example file to .env: cp .env.example .env
  3. Insert the URL of the Wordpress site you want to export the comments from in your .env file. This is necessary to extract the id from the post, which is used as the directory for the comment
  4. Run docker-compose up
  5. Find the yaml files in the output directory within their respective directories

About

A tool that converts Wordpress comments to well-readable yaml files that can be e. g. used by Staticman.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published