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
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: