MediaWiki-Docker/Configuration recipes/Wikidiff2
Appearance
This page covers how to quickly get Wikidiff2 working in MediaWiki-Docker.
Quick install
[edit]If you just need to test with Wikidiff2 without making any changes to Wikidiff2, enter the container and simply install it with apt-get install php-wikidiff2
. MediaWiki should detect its installed and automatically use it.
Developer install
[edit]- Install libthai and other dependencies:
apt update && apt install -y pkg-config libthai0 libthai-dev
- Clone the repo and install from source:
cd /home git clone https://gerrit.wikimedia.org/r/mediawiki/php/wikidiff2.git cd wikidiff2 phpize ./configure make make install
- Make Wikidiff2 available to PHP (replace
8.1
with the appropriate version as needed):echo 'extension=wikidiff2.so' > /etc/php/8.1/mods-available/wikidiff2.ini ln -s /etc/php/8.1/mods-available/wikidiff2.ini /etc/php/8.1/apache2/conf.d/wikidiff2.ini ln -s /etc/php/8.1/mods-available/wikidiff2.ini /etc/php/8.1/cli/conf.d/wikidiff2.ini ln -s /etc/php/8.1/mods-available/wikidiff2.ini /etc/php/8.1/fpm/conf.d/wikidiff2.ini phpenmod wikidiff2
- Verify it's installed with:
php -d 'extension=wikidiff2.so' -i | fgrep wikidiff
- Exit the container and restart it with
docker compose restart mediawiki
.