Download the latest version of MediaWiki available at\u00a0https:\/\/www.mediawiki.org\/wiki\/Download to the \/opt\/ directory on the server:<\/p>\n
cd \/opt\/\r\nwget https:\/\/releases.wikimedia.org\/mediawiki\/1.27\/mediawiki-1.27.1.tar.gz\r\ntar -xvzf mediawiki-1.27.1.tar.gz\r\nmv \/opt\/mediawiki-1.27.1\/ \/var\/www\/html\/mediawiki\r\n<\/pre>\nAll files have to be readable by the web server, so set a proper ownership:<\/p>\n
chown www-data:www-data -R \/var\/www\/html\/mediawiki<\/pre>\nCreate a new MySQL database and user:<\/p>\n
mysql -u root -p\r\nmysql> SET GLOBAL sql_mode='';\r\nmysql> CREATE DATABASE wikidb;\r\nmysql> CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'y0uR-pa5sW0rd';\r\nmysql> GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'localhost';\r\nmysql> FLUSH PRIVILEGES;\r\nmysql> quit<\/pre>\nDo not forget to replace ‘y0uR-pa5sW0rd’ with a strong password.<\/p>\n
Create a new virtual host directive in Apache. For example, create a new Apache configuration file named \u2018mediawiki.conf\u2019 on your virtual server:<\/p>\n
touch \/etc\/apache2\/sites-available\/mediawiki.conf\r\nln -s \/etc\/apache2\/sites-available\/mediawiki.conf \/etc\/apache2\/sites-enabled\/mediawiki.conf\r\nvi \/etc\/apache2\/sites-available\/mediawiki.conf<\/pre>\nThen, add the following lines:<\/p>\n
<VirtualHost *:80>\r\nServerAdmin admin@your-domain.com\r\nDocumentRoot \/var\/www\/html\/mediawiki\/\r\nServerName your-domain.com\r\nServerAlias www.your-domain.com\r\n<Directory \/var\/www\/html\/mediawiki\/>\r\nOptions FollowSymLinks\r\nAllowOverride All\r\nOrder allow,deny\r\nallow from all\r\n<\/Directory>\r\nErrorLog \/var\/log\/apache2\/your-domain.com-error_log\r\nCustomLog \/var\/log\/apache2\/your-domain.com-access_log common\r\n<\/VirtualHost>\r\n<\/pre>\nRemove the 000-default.conf file:<\/p>\n
rm \/etc\/apache2\/sites-enabled\/000-default.conf<\/pre>\nRestart the Apache web server for the changes to take effect:<\/p>\n
service apache2 restart<\/pre>\nOpen http:\/\/your-domain.com in your favorite web browser, click on the ‘set up the wiki’ hyperlink and follow the easy instructions on the install screen inserting the necessary information as requested:<\/p>\n
Select your language and the Wiki language. On the next page, click ‘continue’ if all requirements are met, then enter the following information:<\/p>\n
Database Host: localhost\r\nDatabase name: wikidb\r\nDatabase username: wikiuser\r\nDatabase password: y0uR-pa5sW0rd\u00a0\u00a0 \/\/ change this password with your actual password<\/pre>\nClick ‘Continue’. On the next page select:<\/p>\n
Storage engine: InnoDB\r\nDatabase character set: UTF-8<\/pre>\nClick ‘Continue’. Enter the name of Wiki which will appear in the title bar of the web browser and other places, create an administrator account and install the Wiki.<\/p>\n
In order to improve the speed and performance of your MediaWiki installation, add the following lines at the end of the LocalSettings.php file :<\/p>\n
vi \/var\/www\/html\/mediawiki\/LocalSettings.php<\/pre>\n# Speed improvements\r\n$wgUseGzip = true;\r\n$wgUseFileCache = true;\r\n\r\n# Performance settings\r\n$wgDisableCounters = true;\r\n$wgMiserMode = true;<\/pre>\nSet a proper ownership of the LocalSettings.php configuration file:<\/p>\n
chown www-data:www-data \/var\/www\/html\/mediawiki\/LocalSettings.php<\/pre>\nThat is it. MediaWiki has been installed on your server.<\/p>\n
Log in to the MediaWiki administration back-end and start creating new content, add user accounts, extensions etc.<\/p>\n
<\/p>\n
\nOf course, you don\u2019t have to do any of this if you use one of our MediaWiki VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to install MediaWiki<\/strong> for you. They are available 24×7 and will take care of your request immediately.<\/p>\nPS.<\/strong><\/span> If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"We’ll show you\u00a0how to install MediaWiki on Ubuntu 16.04. MediaWiki is an open-source wiki software written in PHP. Installing\u00a0MediaWiki on … <\/p>\n
Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":24151,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,1698],"tags":[189,59],"yoast_head":"\nHow to install MediaWiki on Ubuntu 16.04 - RoseHosting<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n \n \n \n \n \n\t \n\t \n\t \n