Lektor: Create a basic wordpress migration guide

Created on 16 May 2016  路  7Comments  路  Source: lektor/lektor

It would be handy to have a basic wordpress -> lektor migration guide.

Many of the other static blog engines have either an official guide or a number of community howto blog posts around outlining the migration process from wordpress to static hosting including any gotchas you need to look out for.

I do realise that lektor is a framework rather than just a static blogging engine, but a simple cutover guide would benefit lots of people wanting to give lektor a try.

Or even a simple script/tool to perform conversion would be awesome.

Most helpful comment

I hacked the Jekyll Exporter plugin to export Lektor files. https://github.com/tariquesani/lektor-exporter

Seems to work fine for pages and posts and is pretty fast if used from command line.

All 7 comments

Wordpress can be so heavily customized, that I doubt a simple guide would be enough to help people.

Migrating theme seems simple (just copy static assets and convert theme's markup into Jinja templates), but if you used any plugins that add custom markup, widgets etc than converting all that data into Lektor models (or plugins, or Jinja macros...) can be hard. It may even be easier to just give up and dump generated HTML into Lektor's contents files, as Markdown syntax supports embedding HTML markup - but in that case a general guide "how to scrape a website and convert its content into Lektor project" might be more useful.

I saw this, probably the easiest thing I can think to use for migration for now, apart from general theme/asset twiddling to get it migrated over:

https://github.com/dreikanter/wp2md

Will try it out and see how it goes.

Need something like https://github.com/benbalter/wordpress-to-jekyll-exporter

@geekpete anything to report please?

I believe pelican also has a wp > pelican import tool if it helps for sources to look at:
https://github.com/getpelican/pelican/blob/master/pelican/tools/pelican_import.py

I hacked the Jekyll Exporter plugin to export Lektor files. https://github.com/tariquesani/lektor-exporter

Seems to work fine for pages and posts and is pretty fast if used from command line.

@tariquesani This looks awesome, I'll give it a spin :)

Thanks @geekpete do open issue on the repo if you run into any problem.

If this gets popular I may expand it to have more features. For now it seems to have converted all posts on my site http://tariquesani.net pretty well

Was this page helpful?
0 / 5 - 0 ratings

Related issues

relikd picture relikd  路  6Comments

Endogen picture Endogen  路  7Comments

item4 picture item4  路  3Comments

goanpeca picture goanpeca  路  4Comments

davidferguson picture davidferguson  路  4Comments