This guide will import ONLY posts and feature image. Current migration only supports ghost v1, so if you don’t care about users and other stuff, read on!
- Have ghost db created and restore above 2 table over
- Run a(my) node script
Step 1: Export those tables
the only two tables that we need are
postmeta will contain feature image information that we need to each post. Feel free to use any backup tools or PHPMyAdmin for exporting these two tables from your WordPress site
Step 2: Import those tables
ghost install you should find ghost’s DB created in your DB (I’m using MySQL). We’re going to import those two tables into our ghost’s DB and later remove them when we’re done with the migration.
Importing are done through
mysql -h YOUR_HOST -u USER_NAME -p GHOST_DB_NAME < BACKUP_TABLE.sql
BACKUP_TABLE are those two tables:
Step 3: Run nodejs script
Head to your ghost’s backend and create an integration, note down the Admin API Key
Head over to this repo
You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or…
After you clone or download, just run
npm install or
yarn (your choice). When you’re done grabbing the package, open modify the correct info in
After you’ve updated the correct config, execute
If you’ve found that your blog has some weird symbol, it might be the incorrect encoding set in ghost’s DB.
- stop ghost with
- delete (drop) ghost table, let’s say the DB name is
- create table ghost with MySQL command
create database ghost(assuming the name of ghost’s DB name is
By default ghost use
utf8mb4 for DEFAULT_CHARACTER_SET_NAME
utf8mb4_general_ci for DEFAULT_COLLATION_NAME
But I found that using
latin1 for DEFAULT_CHARACTER_SET_NAME
latin1_swedish_ci for DEFAULT_COLLATION_NAME
works without encoding problem.