WordPress & WooCommerce: Localhost, Staging and production environments and how to sync them without losing data

I recommend to work with fixtures on localhost and development environments. Fixtures definition from Symfony documentation: Fixtures are used to load a “fake” set of data into a database that can then be used for testing or to help give you some interesting data while you’re developing your application. To work with fixtures on WordPress … Read more

Plugin: AJAX query external API to sync to tables

Sketch/Concept To make requests to remote/external APIs, use the WP HTTP API. More in depth examples/details can be found in some of my answers here. Then simply add an admin page with add_submenu_page() or add_menu_page() or the related functions. Finally add a script via wp_register/enqueue_script() on the admin_enqueue_scripts-hook. There you fire an ajax (search archives) … Read more

WordPress – Sync wordpress post with JSON feed

The important step is to assign a unique ID to every item you get from the source. Hopefully the JSON feed already includes one, but otherwise you will have to somehow create one yourself based on the JSON content. Once you have the value, you store it as a meta value of the post being … Read more

Two live WP websites – how to sync?

You have basically tree ways. WP API (JSON) Feed (XML) XMLRPC API I think the first solution via WP JSON API should be your prioritized way. The WP API will implement inside the core of WordPress in the next releases. Currently you can use it via plugin. I think, this is the standard for the … Read more