Thread:Project:Support desk/How to use mediawiki API to edit a page on local server/reply

Did you follow API:Edit?

Also, the api is meant to be used by a client machine. If you want to edit it from the same server, in PHP, you may want to use the edit.php maintenance script.