In order to create posts, we use the
node-wpapi
plugin. This
plugin is used to
generate application passwords, which will give you a WP_TOKEN
.
We need to set user and token credentials, which should be exported in your environment:
export WP_USER='USER HERE'
export WP_TOKEN='PASSWORD HERE'
After that, follow the instructions:
- Clone this repo
- Install dependendencies on project root:
yarn install
- Insert posts on WordPress using Lever data with
node app.js
Note that you may want to remove older posts before inserting new posts. This script currently does not remove older posts automatically.