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).

Optional packages
To enable cache on php (mediawiki will work faster):

If your mediawiki database is encoded in binary php-intl will make the translation from binary to utf8 faster:

Set up MySQL (MariaDB)
This will do the basic configuration of MySQL (without this MySQL will fail to start):

This will start MySQL and and enable the start at bootup:

Set a database root password:

Set up Apache and PHP
If you already have a  file you can run

Otherwise you have to create one from scratch. A very basic (but insecure?) one could look like this:

As the Arch Wiki notes, mod_mpm_event does not work with libphp7.so. So you need to open  and comment the the   and uncomment the  : LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
 * 1) LoadModule mpm_event_module modules/mod_mpm_event.so

Edit  and set the   to the path   (the directory for uploads). open_basedir = "/tmp:/usr/share/webapps/:/var/lib/mediawiki"

Still in, in the  , make sure the following extentions are activated, by uncommenting or creating the following lines: 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. Copy it to. Your Wiki should now be accessible at http://localhost/mediawiki/.

Uploads and image thumbnails
To enabled image uploads, first, install ImageMagick.

Then, in, uncomment the lines:

And finally, restart Apache for the changes to take effect: