Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonhoo/wp2ghost
Convert WordPress XML exports to Ghost JSON import files
https://github.com/jonhoo/wp2ghost
blog conversion export ghost import wordpress
Last synced: 2 months ago
JSON representation
Convert WordPress XML exports to Ghost JSON import files
- Host: GitHub
- URL: https://github.com/jonhoo/wp2ghost
- Owner: jonhoo
- License: mit
- Created: 2014-02-05T02:07:44.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2021-02-01T22:29:20.000Z (almost 4 years ago)
- Last Synced: 2024-10-14T20:57:10.392Z (3 months ago)
- Topics: blog, conversion, export, ghost, import, wordpress
- Language: JavaScript
- Homepage:
- Size: 25.4 KB
- Stars: 62
- Watchers: 5
- Forks: 15
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/jonhoo/wp2ghost.svg?branch=master)](https://travis-ci.org/jonhoo/wp2ghost)
This script will convert WordPress XML [exports][wpexport] ([WXR][wxr]) to the
Ghost (1.x [for now][1x]) [JSON format][gjson]. This JSON file can then
be directly imported using the Ghost debug interface.While there is a [WordPress plugin][wpghost] that will export to the Ghost
format directly, it only seems to work some of the time, and users of
WordPress.com will have a hard time using it seeing how WP.com doesn't allow
plugins at all (in its free account).This is a simple command-line tool that takes a WordPress XML file as input and
prints the corresponding Ghost JSON to standard out. It currently converts the
following:- Posts: title, slug, content, page/post, featured, status, creation/publication date
- Catgeories: name, slug, description (converted to tags)
- Tags: name, slugWordPress authors are parsed, but not added to the output yet because Ghost
currently only supports editing the primary user during imports.To run it, you need to have [NodeJS][node] installed (and
[maybe](https://github.com/jonhoo/wp2ghost/issues/12) also [Python][python]). You
can then just run:$ cd wp2ghost
$ npm install
$ node bin/wp2ghost.js > ghost.jsonNext, go to http://example.com/ghost, select Labs in the menu on the
left, and import `ghost.json`. All your content should now show up!Happy migrating!
[wpexport]: http://en.support.wordpress.com/export/
[wxr]: http://devtidbits.com/2011/03/16/the-wordpress-extended-rss-wxr-exportimport-xml-document-format-decoded-and-explained/
[gjson]: https://docs.ghost.org/api/migration/#json-file-structure
[wpghost]: http://wordpress.org/plugins/ghost/
[node]: http://nodejs.org/
[python]: https://www.python.org/
[1x]: https://github.com/jonhoo/wp2ghost/issues/13