Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8161149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:26:11+00:00 2026-06-06T18:26:11+00:00

I am in the process of writing a small WordPress data sync plugin that

  • 0

I am in the process of writing a small WordPress data sync plugin that is intended to sync some records between two sites. When a new data item is entered on one site, a JSON-encoded version of that data item is posted to a URL on the other site which then digests it and saves it to a local database.

I’m finding it really hard to work out what URL I should be posting the JSON data to so that it gets into the plugin on the other end. Or whether I should be reusing admin_ajax, even though this is server-to-server not browser-to-server.

Happy to assume that both sites are running WordPress 3.3/3.4.

I’ve spent quite some considerable time googling without results, which may simply be that I’m looking for the wrong terminology.

For instance, I might get the sending copy of the plugin to post to a URL such as http://www.example.com/wp-content/plugins/datasyncer/incoming.php – but a shorter URL or a smarter way to do it would be great. While I could make this URL work pretty easily by including ../../../wp-load.php I’m reluctant to do that as that will break on some sites, and is considered Bad Practice in a plugin.

I’m using wp_remote_post() to do the post to URL part, the problem is which URL to post to, not how to post.

I’ll edit this and correct terminology if anyone has any ideas that help! Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T18:26:12+00:00Added an answer on June 6, 2026 at 6:26 pm

    You can post anywhere you want (in front side, and not on admin side, of course). You can even post to the home page. Just make sure that you don’t post any data which conflicts with wordpress core. For example: name, post, p are all reserved.
    Add a prefix to all your post variables “myplugin_name” is ok, “name” is not.
    Then in your plugin code add a condition to check if something was posted:

    if(isset($_POST["myplugin_remote_data"])) {
         // check if data was indeed sent by your server. use some api key etc
    
         // save the data
    
         // echo some response telling if data was posted or not. anything you want.           
    
         die(); // no need to show the page
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm in the process of writing a small text-editor that is supposed to have
I'm in the process of writing a jQuery plugin, and am getting into some
I'm writing a small DLL component that needs to access two third party components
I'm in the process of writing a small web app that would allow me
I'm writing a small app that needs to have a super easy install process.
I'm in the process of writing a small lisp interpreter in haskell. In the
Let's say you had an external process writing files to some directory, and you
I am in the process of writing some validation code based on these assumptions:
I'm in the process of writing a small overhead view RPG much in the
I am in the process of writing a class that will probably end up

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.