New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wordpress Export to Ghost initial version #621
Comments
I can take this on. |
👍 I had a feeling you might say that 😀 |
😉 |
@javorszky you are now listed as a committer on http://plugins.svn.wordpress.org/ghost/ |
@JohnONolan, awesome, thank you. @ErisDS, I summon thee, for thee are needed for the questions below as well. :) (and everyone else who wants to chime in)
If I've left out something add it here, otherwise I'll start hacking my way around it. |
I would say
|
WRG to pages, what about hierarchical pages? Like About Us / The team, About us / The service, etc... |
Just strip the hierarchy - I reckon. |
More questions:
|
Hah, importer doesn't have a concept of tags, so I'm not dealing with those. |
The importer for this isn't written yet, I'm working on it in #734 and it will have a concept of tags. Do posts & tags to start with. Then if there is time, export as much data as possible - that way people have their data saved. In the future, the importer can read more of the data and deal with it. |
So I can decide on the exported format, and whoever's doing the importer will conform to that? |
The idea is to make it work with one of Ghosts standard importer. However
Therefore, if you export WordPress data to look roughly like a normal Ghost export but with extra stuff in it, all should be fine. |
Wouldn't someone running a ghost blog most likely want to replace WordPress pages with static HTML pages outside of Ghost? In which case it would make more sense not to import them at all... |
First pass at the plugin, download this file: https://www.dropbox.com/s/rrq2fegu4yb7vid/wordpress-2-ghost.zip, then go to plugins, add new, from zip file, upload it there, and then Plugins -> WordPress 2 Ghost, download the file, and try to import it to Ghost ( /ghost/debug/ ). Currently:
|
Kill the 500kb screenshot and placeholder banner assets for optimum load times :) |
I also need to get rid of a few js files and whatnot, but functionality wise, does it work? :) |
Failed to parse the import file : https://dl.dropboxusercontent.com/u/531857/ghost/wp2ghost_export_1379474807.json |
I think optimal menu item would be "Export to Ghost" under the "Tools" section. |
First run import:
|
wee... right, knee-deep! Worken. :) |
Here's my file too http://cl.ly/RRn2 |
woo, sorting the slug issue. Also, here's to handling REALLY LARGE files. Both of yours are more than half a meg of pure text. Awesomeness :) |
Right, here's a newer version: https://www.dropbox.com/s/5z3ynm8jd2paqzd/wordpress-2-ghost-6.zip I was able to import Hannah's feed in no problem. Also tested with a client site with 270 posts (file size 3.4 mb). @JohnONolan, your file failed to import because it's cut in half. As if fwrite didn't finish whatever it was doing, and I have no idea how to even begin to debug that. What's the php version on the server your WP install is on? My other idea is that for some reason the header isn't getting the correct filesize value, and thus browser cuts off transmission halfway through... |
We should probably come up with some sensible content? Maybe a nice Ghost logo? @JohnONolan |
Content is going to be added later (when I get home). Stuff like:
|
How do we feel about recommending users use something like http://wordpress.org/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/faq/ before exporting to ensure they keep their images? |
Also, as per IRC: please can we swap the order the posts are exported so that they get updated_at timestamps in the same order as published_at? Thanks! |
Good - provided it's simple to use. |
Thoughts on shortcodesThis is just me thinking aloud about what to do with shortcodes. We don't really have a way to handle them right now. But there are two types. 1. Ones which are built into WP. You might not even realised you used one:2. Custom onesIs there a way we can detect what shortcodes are present on a WP install? Maybe map them to some html? This is all long term stuff, we probably need a WP-specific importer which post-processes the WP markup and does something sensible with these. |
Yup, I can totally export the entire regex for all the shortcodes, ever. And import that into Ghost. And possibly create a Ghost.Shortcodes object while I'm at it. |
The problem though is grabbing the content of the functions in php, which would pretty much be a case of... nope. Because of the differences between the two languages, I can't reproduce the exact behaviour, unless I manually rewrite them in js. |
I wasn't suggesting we reproduce them in any way. This is seriously future stuff but for all the WP ones have some standard transformation Then for each of the custom ones, provide a form where they can be mapped so in my case It wouldn't be a perfect reproduction, it's more about not having shortcodes in the posts any more. |
Oh, that shouldn't be a problem. Regex and I have an ... understanding that we developed over the years. :) |
Oooooh my vimeo embed imported properly :D |
Righty-o. I've written some text. There's css styling missing badly from that page, but I think the content is okay unless y'all have legal / stylistic suggestions to it. Grab it here: https://www.dropbox.com/s/cf5avz6p3o56eec/wordpress-2-ghost-9.zip |
By the way: text is in |
@link is currently pointing to javorszky.co.uk - would you mind pointing that to ghost.org? Cheers John On Wednesday, 18 September 2013 at 19:23, Gabor Javorszky wrote:
|
Sure, replacing file in a few mins... |
Updated comment with the link with the correct legal meta-info :). |
Leaving a mental note for future me tomorrow: |
Can be closed because: http://wordpress.org/plugins/ghost/ :) |
:) |
* Changed {{code}} to {{statusCode}} refs TryGhost/gscan@2ebd9fe - {{code}} use has been deprecated in canary rule set of gscan * V3 Update * Update package and readme for 3.0 * Improve install instructions * Update to support browserlist * Upgrade dependencies * Fix misnamed property * V3 darkmode (TryGhost#619) Added dark mode styles * Casper final refinements batch 1 * Casper final refinements batch 2 * Fixed bookmark card hover bug * Fixed header social links * Updated screenshots * Updated readme no issue - refreshed screenshot * Udpate screenshot in readme no issue * 3.0.0-beta.2 * Fixed cut header for post cards no issue * 3.0.0-beta.3 * 3.0.0-beta.4 * Updated current version and previous version logic (TryGhost#554) no issue - Use current version from `package.json` instead of `npm_package_version` env variable - Use `release.tag_name` instead of `release.name` for previous version * Updated jQuery to 3.4.1 to avoid known vulnerabilities (TryGhost#590) no issue https://snyk.io/vuln/npm:jquery?lh=3.2.1&utm_source=lighthouse&utm_medium=ref&utm_campaign=audit * Fixed code cards with long lines from being too wide no issue Credits - TryGhost/Casper#602 * Bumped gscan version to v3.0.0 (TryGhost#621) * Bumped gscan to v3.0.0 - This also fixes failing CI builds because the default rules that are being checked were for v2 * Added explicit version check for gscan command * Added member subscription support (TryGhost#623) * Added member subscription support no issue * Added member subscription success message no issue * Added member subscription overlay * Refined members subscription overlay * Deleted unused website icon * Ran CSSComb * Updated built assets * 3.0.0-beta.5 * Updated built assets for v3 no issue * 3.0.0-beta.6 * Remove unused partial * V3 cleanup (TryGhost#625) * Removed unused infinity icon * Removed unused location icon * Removed unused 'point' icon * Removed unused Ghost logo icon * Removed unused author partials * Cleaned up index log * Fixed responsive feature image sizes for page template
One feature that everyone is clamouring at our heels for is the ability to move their data from an existing WordPress blog.
We have a shiny import feature, which needs a few tweaks to prevent duplication & to make sure tags work, but otherwise is working.
We should be able to write a plugin for WP which exports the data we support in exactly the format we need to use with our importer. This should provide the option to choose a single user to export, and then export all posts, tags, and any settings which are useful to us.
It would be great if the plugin also provided instructions on how to use the exported file with Ghost.
This is the initial version, because long term we'd like to provide this as a plugin for Ghost which reads the WXR format, rather than a plugin for WP, but we don't have all the pieces in place needed for that sort of plugin just yet.
The text was updated successfully, but these errors were encountered: