A Node.js utility for migrating WordPress data from MySQL to MongoDB. This project includes models for users, posts, media, tags, and categories, as well as utilities for formatting, queueing, and document normalization. This tool is only used for Fresh Group's web CMS with data that has already been adjusted.
This tool using thread worker for formating and adjust posts from wordpress to Fresh Group's web CMS. Set worker on config for adjust your memory.
migration/
├── .gitignore
├── package.json
└── src/
├── config.json
├── index.js
├── db/
│ ├── mongo_connection.js
│ └── mysql_connnection.js
├── models/
│ ├── db_finalizing.js
│ ├── db_reset.js
│ ├── media.js
│ ├── posts.js
│ ├── term.js
│ └── users.js
└── utils/
├── formatPw.js
├── queue.js
└── normalize.mongo.doc.js
-
Install dependencies:
npm install
-
Configure databases:
- Edit
src/config.jsonwith your MySQL and MongoDB credentials.
- Edit
-
Run migration:
npm run migrate
- Node.js
- MySQL database (WordPress)
- MongoDB database