https://github.com/tinacious/migrate-wordpress-blog-hashnode
Some scripts I used to migrate the blog part of my website off of WordPress and onto Hashnode
https://github.com/tinacious/migrate-wordpress-blog-hashnode
Last synced: 8 months ago
JSON representation
Some scripts I used to migrate the blog part of my website off of WordPress and onto Hashnode
- Host: GitHub
- URL: https://github.com/tinacious/migrate-wordpress-blog-hashnode
- Owner: tinacious
- Created: 2020-08-03T23:21:09.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2022-12-11T16:37:05.000Z (over 3 years ago)
- Last Synced: 2025-07-10T23:53:47.303Z (11 months ago)
- Language: JavaScript
- Homepage: https://blog.tinaciousdesign.com/migrating-my-blog-from-wordpress-to-hashnode-ckdgzbasn00zcdns1bmm2dj76
- Size: 93.8 KB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# WordPress-Hashnode Migrator
This is a set of scripts and instructions to facilitate migrating a blog from WordPress to Hashnode.
## Usage
Use the following guide as a walkthrough for this process:
[Migrating my blog from WordPress to Hashnode](https://blog.tinaciousdesign.com/migrating-my-blog-from-wordpress-to-hashnode-ckdgzbasn00zcdns1bmm2dj76)
## Scripts
Install dependencies:
```
npm install
```
### Set up your environment variables
Set the required Hashnode secrets as environment variables in the `.env` file. See `.env.sample` for an example.
```
mv .env.sample .env
```
Open the `.env` file and edit it.
### Clean the posts
This operation is like drinking a kale and cucumber smoothie. It processes the posts in `./posts.json` and performs the following actions:
- removes dirty attributes from content HTML
- converts post content to Markdown
- writes a new file in `./posts/cleaned.json`
```
npm run cleanse
```
### Publish new posts
Once your posts are ready to be published, run the following script.
```
npm run migrate
```