Manual Installation of MediaWiki
A Guide to Using MediaWiki in a Hosted Environment
An instructional website by the developer of mh370wiki.net - a MediaWiki site about Malaysia Airlines Flight MH370.
MediaWiki: Manual Installation
MediaWiki is not like a Windows application - an installation is self-contained and does not spread configuration settings in places like Program files, Registry, user's Local settings, etc.
Consequently it is possible to download MediaWiki to a local computer (Windows or Linux), extract or expand all of the files, and upload to a directory within the /Home folder on a hosting service.
From there the entire collection of files and folders can be copied to a directory in /public/html/your website/w.
After that, you can use cPanel to open a Terminal and configure the installation by running mw-config.
That is the short version.
The long version is that this process is vulnerable to failure because of so many file transfers. I know, because at present my hosting provider does not have a current version of MediaWiki available for an automated install using Softaculous. So I went through all of the above steps and the installation wouldn't run. There were error messages, however, and by tackling those one at a time the problem was narrowed down to one file which appeared to have been uploaded but when compared with the original version was not complete. MediaWiki, like any piece of software, can't run if something is missing.
If your hosting provider does not have the latest version and you want to upgrade, you don't have much choice. This is a time consuming process. Just uploading a few hundred megabytes can take 12 hours or more. In that time, the connection may be lost, your desktop computer may go to sleep, there could be a glitch in the power supply affecting your router - so many things can go wrong!
To minimise risk, break the process down into smaller amounts, upload one directory at a time and check the FTP logs to ensure that file sizes match.
I prefer to create a new sub-domain for testing a new installation. Leave the functional website untouched and secure, create a new folder in /public_html for the new subdomain and create the /w directory with a .htaccess file, upload in batches and copy directories in batches, checking each step.
Actually, I have a directory in /Home where I have kept a 'master' copy of MediaWiki versions so I can copy a set of files to a new website location without repeating all of the above dramas.
When the website on the new sub-domain is functional you can choose to use it as-is, or upgrade a previous version to it, as required.
Hopefully it will be a while before you need to do it again...
Grant
Installation Notes
Version and Compatibility
If your hosting provider offers the most recent version of MediaWiki for you to install you would assume that they would also have the right versions of MySQL and PHP required for a successful install. Unfortunately, that isn't always the case, so there are two things you need to know:-
- MediaWiki releases a major update every six months. A Long Term Support (LTS) version is released every two years. There is a one-year overlap in LTS support. So, if you are unable to install the latest version look for the most recent Long Term Support version and install that. Use that as your benchmark, and update from there. See the Version Lifecycle for details. Avoid an obsolete version.
- Next, look at the Compatibility page. There are two important diagrams:-
- for each version of Mediawiki, a diagram showing the versions of PHP which are compatible. There is some overlap.
- for each version of Mediawiki, a diagram showing the versions of MySQL which are compatible. There is No overlap.
Use the information to select the correct PHP version, and MySQL version if possible, through your host provider interface.
That should satisfy the Installation Requirements. If you read that Manual you will notice that in addition to the software itself, MediaWiki requires a web server and a database server, both of which are supplied and configured by the service provider in a hosted environment.
Installation Directory
If your domain name is www.yourwebsite.net then your hosting provider will likely allocate a folder or directory for your website with the name www.yourwebsite.net which is your root directory.
When you install Mediawiki, create a subdirectory /w which will be your installation directory.
Do not create a directory /wiki.
The logic is that if you want your wiki to use short url's like www.yourwebsite.net/wiki/topic_page then you install the application in /w and then add some lines to a file named .htaccess which instructs the web serverto re-write the URL without the index.php? in the URL. The article on Short URLs has more detail.
Articles which relate to MediaWiki Installation
Articles which relate to MediaWiki Installation are included in Category:Install.
The CategoryTree Extension enables a listing of relevant sub-categories and pages:-
Links
- Compatibility
- https://www.mediawiki.org/wiki/Compatibility
- Manual:Installation requirements
- https://www.mediawiki.org/wiki/Manual:Installation_requirements
- Manual:Installing MediaWiki
- https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki
- Manual:Short URL
- https://www.mediawiki.org/wiki/Manual:Short_URL