MediaWiki, the powerful open-source wiki software that powers Wikipedia, allows users to enhance and customize their wiki by adding modules. It is powerful and scalable software with feature-rich wiki functionalities written in PHP to process and display data from a database. In this blog, we will explore installing modules in MediaWiki in a few simple steps.
When installing modules in MediaWiki, a systematic strategy is required to ensure proper integration. Whether you’re a newbie or an experienced user, these step-by-step instructions will walk you through the procedure.
Features:
- The Vector 2022 skin improves the layout and appearance on smaller screens, making editing and browsing on mobile devices easier.
- Wikis can automatically generate temporary user accounts when edits are saved, improving data security for anonymous contributors. (Requires setup).
- Administrators can now delete both a page and its associated talk page in the same action.
- The {{=}} magic word escapes equal signs within unnamed template arguments, simplifying wikitext.
- Administrators can create a list of legal domains for URL-based file uploads.
How to MediaWiki automatic installation
Installation of MediaWiki can be made simple using TMDHosting services. You may easily install MediaWiki with the Softaculous auto-installer. Simply log in to your cPanel and locate the Softaculous icon under the “Software/Services” section.
First, you must fill in some facts regarding your MediaWiki website:
Find Version – select the version of MediaWiki you want to install.
Select Domain – from the dropdown menu select the domain/subdomain where you will install MediaWiki.
In Directory – the location where MediaWiki will be installed. Leave blank if you want to view your MediaWiki site via https://yourdomain.com.
Wikipedia Name
Wiki Email – use an existing email address in case you need it later.
Operator Username
User Password
Creating a database
To function properly, MediaWiki requires a database to store data. It is advised that you store each program in its database. If you desire, you can retain multiple applications in the same database, but each must have a unique database table prefix. The prefix is configured later in the installation process. We’ll get to this later in the tutorial.
HostKnox customers can create databases using the MySQL > Databases area of the control panel. Click the Add Database button on the left and complete the form that opens.
Tips for a Smooth MediaWiki Installation
Before diving into the installation process, there are a few prerequisites you need to be aware of:
How to Post Content in MediaWiki?
Posting material on the MediaWiki platform is a simple process. You may either look for a page that is not yet online and choose to create it or navigate to an existing page that you want to modify. Look for the “Edit” tab or button, which is typically found near the top of the page.
MediaWiki includes a user-friendly visual editor that lets you format your material directly. Simply input your content in the main section and format it with the various buttons or symbols including bold, italics in headers, bullet points, and more. It is a WYSIWYG editor, so you can see how precisely your formatting will appear in the final version. You may have more options such as inserting images, tables, and links to enhance your material.
Before publishing, click “Preview” to make sure everything looks right. Depending on your MediaWiki configuration, you may have extra features like as inserting images, tables, and links to improve your material.
When you’re finished with your project and preview, click “Save” to publish it on the wiki. This makes your work available to everyone using the platform.
For people who want more control over their content, MediaWiki provides its own markup language for formatting. Most users, however, will find the visual editor to be an excellent starting point. Remember to use headers to divide your text into understandable sections, and use links to connect to relevant articles on the wiki or external websites.
Extension: Scribunto
To utilize modules in MediaWiki, you must have the Scribunto plugin installed. Scribunto allows you to use Lua, a programming language that underpins the majority of MediaWiki modules. Check your LocalSettings.php file to make sure the $wgScribuntoEngine variable is present. If not, include it to enable the extension.
Access to Module Code
To install a module, you need access to its code. Many modules can be found on MediaWiki.org, GitHub, or dedicated repository sites. Make sure you have the necessary code before proceeding with the installation.
Utilizing Your Newly Installed Modules
Now that you’ve successfully installed a module, it’s time to fully utilize its capabilities. To run a module and access its features, follow these steps:
Use the #invoke function. In your wiki pages, use the #invoke function to access the module’s functionality. The basic syntax is as follows.
{{#invoke:ModuleName | FunctionName | Parameter1 | Parameter2 |…`}
Replace “ModuleName” with the actual name of the module you installed, and “FunctionName” with the function you want to access inside the module. Add any relevant arguments as needed (details can be found in the module description).
areas utilizing the capabilities of your just-installed module.
.
For example, if you installed a module called “MyUtils” with a function called “format-number,” you could use it like this:
{{#invoke:MyUtils | format-number | 123456 | 2}}
This example would format the number 123456 with two decimal places using the capabilities of your newly installed module.
Tips for a Smooth Module Installation
As you explore the world of modules in MediaWiki, keep the following tips in mind to ensure a smooth installation process:
1. specify a dependence scope.
Specifying a dependency scope allows you to control when the dependent is used during the construction process. The classpath may change depending on whether your sources are compiled, your test sources are compiled, your compiled sources are run, or your tests are executed.
In the primary menu, select File | Project Structure. Press CtrlAltShift 0S and select Modules | Dependencies.
Choose the appropriate scope from the list in the Scope column.
Compile is required for building, testing, and running a project (the default scope).
Test: necessary for compiling and running unit tests.
The modules that depend on this one are: The marked items will be added to the dependent module’s compilation classpath.
Install MediaWiki software
The MediaWiki tar file can be downloaded from the official download page.
In general, if you’re running a production environment, you should be using the most recent stable release, MediaWiki 1.42.1.
Extract MediaWiki software.
The file you downloaded is in.zip or.tar.gz format. This archive file must be uncompressed before it can be used. You have the option of uncompressing the file locally (and then uploading it over FTP to the server) or directly on the server.
Uncompressing software for Windows is typically 7-Zip (free), WinZip, WinRAR, or IZArc (free).
The command for uncompressing the file on Linux and Mac OS X is tar -xzvf mediawiki-*.tar.gz.
Conclusion
Installing modules in MediaWiki is a simple yet effective technique to improve your wiki’s functionality and user interface. By following the procedures explained in this guide, you may easily integrate modules that use the Scribunto extension and the Lua programming language to extend the capabilities of your MediaWiki installation. Whether you use pre-existing modules or create new ones, the ability to customize your wiki to meet unique needs is crucial.
FAQ
How do I install MediaWiki?
Set a name for your wiki, as well as login credentials and email address. Click Continue. You may disregard the remaining selections and click Proceed to begin setup.
How does one add an extension to MediaWiki?
Follow these steps:
Download extensions for your files.
Put them into the ‘extensions’ directory.
Add the necessary line to LocalSettings.php.
Run update.php if required
How does MediaWiki work?
MediaWiki’s action API provides access to wiki functionality. ContentHandler allows sites to use data formats other than wikitext, such as JSON or Markdown.