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 libphp5.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.) In the same file, remove the leading semicolon in the line with the mysql module ("extension=mysql.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;), 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: