Manual:Running MediaWiki on Arch Linux

Arch Wiki has a page about MediaWiki that provides more details, but lacks paste-able code to quickly get things up and running. So the focus here is on just the basic recipe for a quick installation. Note the following commands should be run as root user (to get into root run, for example).

Set up MySQL
Set a database root password:

Set up Apache and PHP
As the Arch Wiki notes, mod_mpm_event does not work with libphp7.so. So you need to open /etc/httpd/conf/httpd.conf and comment the line: LoadModule mpm_event_module modules/mod_mpm_event.so and then uncomment the line: LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

Edit /etc/php/php.ini and add ":/usr/share/webapps/:/var/lib/mediawiki" at the end of the "open_basedir=" line. (/var/lib/mediawiki is the directory for uploads).

Then, also in /etc/php/php.ini, uncomment the following lines by removing the leading semicolons: (in the Dynamic Extensions section) extension=gd.so extension=intl.so extension=iconv.so extension=mysqli.so

Now start Apache and tell systemd to launch it during boot:

Use the browser to configure MediaWiki
Go to http://localhost/mediawiki/mw-config/index.php and follow the instructions. Enter the database root password you defined above in the appropriate box. Don't skip any parts of the installation even if the installer suggests it—you need those extra steps to enable file uploads and wiki extensions.

When configuration is finished, your browser will download the file LocalSettings.php. Copy it to /usr/share/webapps/mediawiki/. Your Wiki should now be accessible at http://localhost/mediawiki/.

Uploads and image thumbnails
If you have enabled image uploads in LocalSettings.php ($wgEnableUploads = true;</tt>), you may want to install ImageMagick

and uncomment the lines

in /usr/share/webapps/mediawiki/LocalSettings.php</tt>. Then restart Apache for the changes to take effect: