Manual:Edit.php

Edit an article from the command line

Usage: php edit.php [options...]

Options: -u        Username -s     Edit summary -m               Minor edit -b               Bot (hidden) edit -a               Enable autosummary --no-rc          Do not show the change in recent changes

If the specified user does not exist, it will be created. If no username has been provided, the edit will be attributed to user "Maintenance script", created if needed. The text for the edit will be read from stdin.

Examples
php edit.php -s "Quick edit" -m Page_I_want_to_edit < file_containing_wikitext Will edit the page Page_I_want_to_edit (marking the edit minor) so it contains the contents of file_containing_wikitext using the edit summary Quick edit. php getText.php "page title" | sed -e '...' | php edit.php (Note, this is safe and will not truncate the file.)