Patch Command
From InfoTechPedia
Revision as of 07:56, 15 August 2020 by TomHutchison (talk | contribs)
This page shows how to use the patch command in CLI
Example using MediaWiki patch files to update minor versions of MediaWiki.
A small patch file is usually made available for a minor version upgrade. Manually download and extract the patch file from the dumps site or follow the directions with wget below. Patches are incremental, you can not skip a version.
- cd to your main MediaWiki directory (the one with LocalSettings.php)
- Download the patch file and gunzip it.
gunzip mediawiki-x.xx.x.patch.gz
- Use patch
-p1 --dry-run
to check what will be changed (e.g.,patch -p1 --dry-run -i mediawiki-x.xx.x.patch
) - If all is well, run patch again without --dry-run.
- Check your Special:Version and you should see the new version number in place.