package a script called by http in a plugin way (3 posts)

  1. ben.IT
    Posted 3 years ago #

    I am working on wordpress php script which performs in house administrative tasks.
    This script is called using HTTP request.

    For instance : http://mywpinstance.com/myscript.php

    I would like to package this script in a plugin way.

    How can i do this ?

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    I'd suggest that you start with Writing_a_Plugin.

  3. ben.IT
    Posted 3 years ago #

    Hi, thanks for your answer.
    I'll try to be more precise.

    I have already read this resource and know how to write my own (very basic) plugin.

    I have developed a script which instantiate an XML RPC client to synchronise content between 2 wordpress instances.

    I perform HTTP requests to run this script : http://mywpinstance.com/myscript.php

    now I would like to package it as a plugin.

    To perform this, I think I'm gonna try adding a rewrite rule,
    I will call : http://mywpinstance.com/myscript.php which will execute the code of http://mywpinstance.com/wp-content/plugins/myplugin/myplugin.php

    Hope this will work !

Topic Closed

This topic has been closed to new replies.

About this Topic