HTML Template to GravCMS, Part 1
Introduction This post (and the ones following) documents how I converted a nice HTML theme called Editorial from HTML5 Up to a usable theme for...
Wordpress, like GravCMS, is a PHP-based content management system. Unlike Grav, Wordpress requires a database to store its data. Grav uses the filesystm to store configuration and page data.
Wordpress does not natively offer an option to export its data in a format that Grav can easily use. In order to perform the export, you'll need the following:
I've written a wp-cli plugin that will do almost all of the heavy lifting for us called wp2grav_exporter.
wp-content/plugins/wp2grav_exporterfolder on the Wordpress server.
composer installto install the PHP dependencies of the plugin.
wp wp2grav-FEATUREwhere FEATURE is:
users: Exports WP users to Grav account yaml files.
roles: Exports WP roles to Grav groups yaml file.
posts: Exports WP pages and posts to Grav pages markdown files.
post_types: Export WP page and post structure to a Grav theme, usable by the Grav admin plugin.
all: Iterates through all the above features.
wp wp2grav-users will create a folder with a Grav account for each Wordpress user.
All exported files will be saved to the Wordpress's
wp-content/uploads/ folder under
DATE is the current date. This folder can be drag-dropped into a Grav site's
user folder. See the learn site for how to install Grav.
You'll need to change the Grav site theme to
wordpress-export inside the
pages: theme: wordpress-export