I have made a simple Mobile App to update a wordpress site.

It starts with a login (to the app) and then with forms, sends data via POST method to a PHP file that then uses wp_insert_post, wp_insert_attachment, add_post_meta, etc to create the new post.

My concern is that this PHP page is not secure. If anybody got hold of the filename, they could insert anything to my site. My PHP file uses include ("wp-load.php"); and then does its work, but I feel there is something I am missing as far as user verification that I can't figure out how to do via searching online. Any pointers to where I can learn about this would be appreciated.

I have tried to deconstruct the Wordpress Mobile App, but it is a little too complex for me.


1 Answer 1


The safest way to manage content from outside of the WordPress dashboard, and make use of the WordPress roles and capabilities model, is via XML-RPC.

The basic methods built in to WordPress XML-RPC allow you to add, edit and delete posts and media, and restrict the ability to do so based on WordPress user permissions. The problem is that it's a little complicated to use if you're new to programming, and the built-in XML-RPC methods are limited in terms of functionality.

For example, creating a new post with four images, and making one of those images the featured image, and adding different taxonomy terms to the post (categories, tags, etc.) based on some arbitrary criteria can require either making several XML-RPC calls in a certain order, or the need to create a custom XML-RPC method.

Here's a fairly basic primer on WordPress XML-RPC using the Incutio XML-RPC library, which is what WordPress core uses to handle XML-RPC requests: http://jumping-duck.com/tutorial/using-xml-rpc-in-wordpress/

  • Thanks. I finally feel like I'm getting a handle on XML-RPC. Do you know if this is considered a good practice these days? Mar 19, 2015 at 22:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.