How to migrate wordpress site to ghost blog and deploy to github pages.
It is worth noting that this tutorial cannot completely migrate wordpress to ghost blog, only articles.
After my test, we can't migrate the articles in wordpress to ghost blog at one time, I recommend backing up 20 articles each time.
Preparation: Install nodejs
, ghost blog
locally, and successfully enter the ghost blog backend, that is, run the npm start
command in the project file, and then set http://12.0.0.1:2368/ghost.
Next, export 20 wordprss articles as 20.xml
.
Then, we need to use the following tools: wp2ghost
Through the wp2ghost
tool, we can convert 20.xml
to 20.json
, which is the format supported by ghost blog.
Then, we can restore the articles in 20.json
through the Import function in the ghost blog Labs
option.
Because ghost blog is a dynamic blog system, and github page
only supports static files. So we have to convert the articles we just restored into static files.
The next action needs to be done with the local ghost blog running.
Go to the local ghost blog theme directory, run the buster generate
command, then you will get a folder called static
, which contains the static files of ghost blog, the next step is to upload these static files to your github page
.
As for how to upload the static
to a github page and define a domain name, there are many tutorials available online.