Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/konsalex/gatsby-wordpress-migrate
Simple Node Script for converting Wordpress XML export of Posts to Gatsby blogposts 🤟
https://github.com/konsalex/gatsby-wordpress-migrate
Last synced: about 1 month ago
JSON representation
Simple Node Script for converting Wordpress XML export of Posts to Gatsby blogposts 🤟
- Host: GitHub
- URL: https://github.com/konsalex/gatsby-wordpress-migrate
- Owner: konsalex
- Created: 2019-01-05T17:37:40.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-08T08:54:39.000Z (over 3 years ago)
- Last Synced: 2024-10-23T08:50:50.917Z (about 2 months ago)
- Language: JavaScript
- Size: 1.41 MB
- Stars: 101
- Watchers: 0
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - gatsby-wordpress-migrate - Simple Node Script for converting Wordpress XML export of Posts to Gatsby blogposts 🤟 (JavaScript)
README
gatsby-wordpress-migrate![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)
![](https://img.shields.io/npm/l/gatsby-wordpress-migrate.svg)
![](https://img.shields.io/npm/dw/gatsby-wordpress-migrate.svg)Migrate from Wordpress without pain!
Huge community is migrating from Wordpress to Gatsby, especially developers. In order to migrate with ease and out of my pain I created this tool.
With `gatsby-wordpress-migrate` you can convert all your wordpress posts to gatsby-blog compatible in a fraction of a command.
## 🚀 Quick start
**Install** this package globally or to your project with npm or yarn.
```sh
# Install gatsby-wordpress-migrate globally with yarn
yarn global add gatsby-wordpress-migrate
```or
```sh
# Install gatsby-wordpress-migrate locally with yarn and make it a dev dependency
yarn add -D gatsby-wordpress-migrate
```**Heads up**. To download all the Wordpress posts of yours, login to your Wordpress dashboard, go to `Tools > Export` and then download export file with your posts.
**Tip:**
Add this code at the end of the functions.php (on wordpress, go to Appearance > Editor > functions.php) of your wordpress theme to export the `` tags so we'll be able to make your text breath (otherwise they are not exported and we won't be able to say when paragraphs start/end) ;)
```php
function codelight_content_export($content) {
return wpautop($content);
}
add_filter('the_content_export', 'codelight_content_export', 999);
```
**Run** the CLI commands `wordpress2gatsby` and let it guide you **or** run it with the following syntax.
```sh
wordpress2gatsby
# Example: wordpress2gatsby wordpressdata.xml content/blog
```## 🧐 Example
![example](./example.gif)
## 🤟 Help it grow
You can jump in and contribute directly or file an issue in order to start exploring more opportunities/edge cases
To file the issue just follow the instructions 📃
---
Made with  🧠   by Product E:ngineer