This documentation is about the MediaWiki installation on a cPanel Server. We all have used Wikipedia website in order to search for information. MediaWiki is the webserver software behind Wikipedia, Wiktionary and Wikimedia. MediaWiki is open source wiki software licensed under the GNU General Public License (GPL). It is completely written in Hypertext pre-processor language PHP. Also, it uses a database to store contents. MediaWiki software is optimized to handle large projects and is also powerful, scalable, and offers many features.
Installation Requirements
Web Server
Most installations use the Apache web server. However, MediaWiki has also been tested under IIS 7.0, Cherokee, Hiawatha, LiteSpeed, nginx and lighttpd.
PHP Version
PHP is the programming language in which MediaWiki is written, and is required in order to run the software. For the latest stable version of MediaWiki, PHP version 5.5.9 or later is required.
PHP Extensions
In order to work properly some PHP extensions are required. Perl Compatible Regular Expressions (PCRE), Session, Standard PHP Library, JSON, mbstring, intl extension, php_mysql.
Database Server
MediaWiki uses a database to store all text and data. Following database servers are compatible with: MediaWiki. MySQL 5.0.2 or later or MariaDB 5.1+, PostgreSQL 9.0 or later, SQLite 3, Microsoft SQL Server 2008 R2 or later.
Hardware requirements
The recommended minimum requirements are 256MB of RAM for a single-computer website and 85MB of storage. This will not suffice for a busy site or a site with uploading enabled.
Installation Steps
1) Downloading and Extracting the Software
First you have to download the latest stable version of MediaWiki from the official download page. The following command downloads the latest version to the webserver.
# wget https://releases.wikimedia.org/mediawiki/1.28/mediawiki-1.28.0.tar.gz
The downloaded file will be a compressed file and you must extract the file into the preferred directory. The below command does this extraction.
# tar xvzf mediawiki-*.tar.gz
2) Creating database for the installation
Next step is to create a database and database user. This can easily be done in cPanel using the MySQL Database Wizard option. In cPanel, select MySQL Database Wizard from the databases section. Enter a name for the new database you wish to create and continue to the next step. Enter a username and password to create the database user account and continue to the next step. Select all privileges to set security permissions the user has on the database and continue to the next step. Make sure the database username, database name, and password are saved in a notepad or other text editor so they can be used later during the installation process.
3) Running the Installation Script
After downloading the software and creating the database the next step is to install the MediaWiki software. This can be easily done through a web browser by visiting the index.php URL. If you have extracted the contents to home/public_html/yourdomain/ directory the URL will be http://yourdomain.com/index.php’. Also, the installation script can be executed via the command line interface by running the following command.
# php maintenance/install.php
Configuration of MediaWiki
After the setup script has finished running successfully, a file called LocalSettings.php is created in the mw-config directory. This file contains all the information needed by MediaWiki to run. Move this file to the main wiki directory where contents are extracted. Set stringent permissions on the LocalSettings.php file. The details like: Wiki name, Contact email, Language, Admin username and password, Database host, database user, database user password, Database name, etc will be in LocalSettings.php. Now the installation is completed and you can customize the installation using the links on the MediaWiki homepage.
If you need any further assistance please contact our support department.