Coder Social home page Coder Social logo

joelgarciajr84 / wp-to-mongo Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 1.0 17 KB

Save a remote WordPress post into your local MongoDB. Works in all WordPress (4.7 or above) or any WordPress installation which have WP-REST-API enabled.

License: GNU General Public License v3.0

JavaScript 100.00%
wordpress mongodb nodejs wp-rest-api

wp-to-mongo's Introduction

WordPress to Mongo

Save a remote WordPress post into your local MongoDB. Works in WordPress (4.7 or above) or any WordPress installation which have WP-REST-API enabled.

Install

git clone https://github.com/joelgarciajr84/wp-to-mongo
cd wp-to-mongo
npm install

Run

nodejs server.js

Will be running at your browser at port 8484

Use

You have to send 2 arguments

  1. First one is 'siteurl' (http://mybeautifulwebsite.com/wp-json/wp/v2/posts)
  2. Second is 'postid' which is the post id you want to retrieve and save at your local MongoDB
  3. Full sample: http://localhost:8484/?siteurl=http://mybeautifulwebsite.com/wp-json/wp/v2/posts&postid=5068
  4. If everything works fine you should see this message:
{
    "POST": "5068",
    "STATUS": "Saved successfully"
}

Contexts of application:

  1. Remote Data Retriever or a detached Database to other uses
  2. Remote Backup
  3. Data Mining - BigData etc.
  4. There is no delay in the requests, so you can write an application that sends the ids in a loop to be checked and saved in the database.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

wp-to-mongo's People

Contributors

joelgarciajr84 avatar rminelli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

aaronchiu2017

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.