Hi,
Is there a way to import wordpress content on Grav ?
I am very interested to switch from WP to this very nice CMS :)
Thanks for your time,
Regards
Tom
I'm afraid we don't currently have a wordpress import. Definitely something we will look at for the future though! Thanks for the feedback. :+1:
OK thanks for the good new :)
Hi,
I聽have found a way to do the export, it seems to work at this time. I just can't export pictures.
wp2md -d ./ export.xml -ps {title}/item.md.The -ps allows you change the structure of the export. The structure here is made to fit the blog skeleton of Grav.
It appears .md files are not out-of-the-box okay for Grav. I continue my researches, and I tell you :)
Header is in wrong format, which prevents the files from working.
Yup, I'll try to do a little script, but I'm not very familiar with python.
I made a first try in bash : https://gist.github.com/tmos/6131ecd3a7a1d526341d
And it seems to work pretty well :) !
With this header from wp2md : 聽
title: Wikipedia VS Universalis
link: http://tomcanac.com/blog/2013/09/21/wikipedia-vs-universalis/
author: tomcanac
description:
post_id: 1384
created: 2013/09/21 15:20:24
created_gmt: 2013/09/21 14:20:24
comment_status: open
post_name: wikipedia-vs-universalis
status: publish
post_type: post
I have this :
---
title: Wikipedia VS Universalis
date: 2013/09/21 15:20:24
taxonomy:
category: blog
---
And the import seems to be okay on my dev install. If anybody can confirm, it could be great :)
you could set a few more header options that you might find useful. For instance, that postname could be used to set the 'slug' on the grav page. Is there anyway to get the wordpress tags for this article? Would be nice to set those too. Nice work though!
Yes, the slug could be used to keep the same links on some sites (if permalinks were not modified).
The wp2md script doesn't export tags and/or catergories :( I聽asked to the creator, but he don't seems on the script anymore.
Well, this is not perfect, but works for a little migration.
I hope it can help some people :)
I did the following:
https://petermolnar.eu/linux-tech-coding/exporting-wordpress-to-a-grav-friendly-markdown-yaml-format/
The HTML to markdown is tricky, especially with definition lists and tables, full auto import might not entirely be possible.
hey guys, am working on a wp plugin to export into a grav file structure. The export will support multilingual sites using qtranslate and qtranslate-slug
Just released the wordpress plugin wp2grav to export pages, posts, authors, categories, tags into the grav format:
https://github.com/SiteBeez/wordpress-wp2grav-markdown-exporter
I'll test it soon ! Thanks for sharing !
Does it handle images ?
@simogeo just updated the documentation regarding images and link.
Also submitted to
https://wordpress.org/plugins/wp2grav/
(lets see if it gets approved...)
I tested your plugin. It works well ! great job
great! feel free to improve the code if you see any need
I believe this one can now be closed. :)
The plugin was removed from the wordpress.org plugin site.
@jeffmcneill You can find the plugin here: https://github.com/SiteBeez/wordpress-wp2grav-markdown-exporter, but from the reviews on WP.org it seems it's not working.
Hi @Kuzmanov thanks for that. Are there any other options for doing migration from Wordpress? I see this plugin, but it looks like it only fetches, but does not store Wordpress posts. Also, I've got both posts and pages that need migration from a few different sites.
https://github.com/cpannwitz/grav-plugin-fetchwp
P.S., my content is already stored in Wordpress in Markdown (I use the markdown-extra plugin), so conversion from html is not needed.
@jeffmcneill No idea if there is a working plugin for migration, but I will definitely look into that and develop one :) FetchWP is not doing any migration.
Just an idea: You can export wp_posts in csv and create folder and post.md with the content using a shell script.
@Kuzmanov the tables are very messy. Export out to xml and then modify from there is the only sane approach I can see (which is what the previous plugin did). I'll take a look at the errors it is throwing.
Most helpful comment
Hi,
I聽have found a way to do the export, it seems to work at this time. I just can't export pictures.
wp2md -d ./ export.xml -ps {title}/item.md.The
-psallows you change the structure of the export. The structure here is made to fit the blog skeleton of Grav.It appears .md files are not out-of-the-box okay for Grav. I continue my researches, and I tell you :)