Mediawiki is a free and open-source wiki software that allows you to create your own wiki site. Mediawiki comes with many features, including Multi-Language support, User Management, Content management, and sharing, Editing, Formatting, Referencing, and much more.
Here in this tutorial, “how to install MediaWiki” we are going to discuss how to install MediaWiki on a CloudStick managed ubuntu server.
Follow the step-by-step procedure in this tutorial on “How To Install MediaWiki”:
Step 1: Log in to your CloudStick account and select the server
Step 2: Create a custom PHP web application to install MediaWiki using the article on “how to install MediaWiki”
Click on the ‘Accounts’ tab from the left side menu.
Then, click on the ‘Create account’ option.
NOTE: Please ensure that the File system quota is enabled before performing this procedure.
Select the Custom web application from the list.
Fill in the required details.
Start with your email address. Provide a valid email address in the specified area.
For the ‘Web application name’, here we are using “MediaWiki”. You can use any name you like.
For ‘Domain name’, you can use either your own domain or a CloudStick free domain. If you are using your own domain, make sure you configure the DNS record for the same
Note: If you use your own domain, you can install an SSL Certificate for your website.
Here we are using ‘testwiki’ as the username.
Next is to set a password for the web application, then enter the quota size you want. Here, we are setting it as 2048M (2GB).
Here we are using PHP 7.3 for MediaWiki. Other PHP versions are also available in CloudStick.
For ‘Web Application Stack’, choose ‘Nginx + Apache’ which will allow you to use the .htaccess file.
Click the ‘Advanced Settings’ checkbox to configure some extra settings.
For ‘max_execution_time’, we suggest increasing the value to 360 to avoid any timeout issue during the installation process. Also, the ‘memory_limit’ shall be increased to 256MB for a smooth performance.
Then click on “Add web application”.
Perfect, now we have created a PHP web application for MediaWiki.
Step 3: Database Setup
For MediaWiki, we need to create a database. You can easily do this from the CloudStick dashboard.
Click on the ‘App Databases’ tab from the side menu. Create a database and a database user.
Then click on the ‘Grant User’ option to connect the user with the database. You can also set a password for the database user from the dashboard.
Here, we have created a database ‘wikidb’ and database user ‘wikiuser’.
Step 4: Install MediaWiki using our article on how to install MediaWiki
Download MediaWiki
Here, we are installing MediaWiki via SSH. For this, you need to log in to your server using SSH from either Terminal / Putty (for a Windows PC). Just follow the steps in the article on “how to install MediaWiki”.
Log in as the system user with which you created the Web application. In this case, it is ‘testwiki’. If you need the password for the system user to log in, you can simply reset it from the ‘System Users’ tab.
If you are using Terminal, you can run the following command to log in to your server. Please do not log in as “root”, to avoid any file/folder permission issue.
ssh <username>@<ipaddress>
Here the <username> is ‘testwiki’, remember to replace <ipaddress> with your server IP.
Change the working directory to the MediaWiki web application root directory.
cd /home/testwiki/apps/MediaWiki
Now, we can download MediaWiki Using below Command
wget https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.1.zip
After downloading the file using the above command, unzip the file from the CloudStick dashboard.
Go to ‘File Manager’ select the file you want to unzip and click on ‘Extract’.
Click on ‘Extract File’ to unzip the file.
You can now open the MediaWiki web application inside your browser with the domain name you have created.
Perfect! Now you can proceed with the setup wizard by clicking on ‘set up the wiki’
Here, choose your wiki language and click on the Continue button. You should see the following page:
Again, click on the Continue button.
In the database section inside MediaWiki installation, use localhost as the database host. Then provide the database details which we created earlier. You can leave the table prefix field blank.
After filling up the details, click on continue.
Check the box for “use the same account for installation” and click the Continue button.
Now, provide your wiki site name, username, password, and your email id
You can proceed with the “just install wiki option” or if you want to make more changes you can also do that by choosing “ask me more option”.
Here we are continuing with the 2nd option.
After checking the desired options click on the Continue button.
Here you can check the status of your installation. Again click on Continue
Here just click on the Download button, a file with the name LocalSetting.php will be downloaded on your computer.
Now, transfer the file “LocalSetting.php to the server, under the web application root.
Here our root directory is “/home/testwiki/apps/MediaWiki”
You can transfer your file via SFTP or if you are using Linux, you can use the below steps to transfer the file:
- Open Terminal
- Change the directory to where you have downloaded the LocalSetting.php file using the “cd” command:
cd /path/to/your/file
- Then Use the “scp” command to transfer the file:
scp LocalSettings.php <username>@<ipaddress>:/path/to/you/webroot
- In our case the <username> is ‘testwiki’ and webroot is “/home/testwiki/apps/MediaWiki”. Also, remember to replace the IP address with your server IP address.
After transferring the file to the webroot. You can open your browser with the domain name that you have created.
Done! Now you are ready to use MediaWiki that you installed with the tutorial “How To Install MediaWiki “.