How to Use the Category in MediaWiki and Rename a Category?

How to Use the Category in MediaWiki and Rename a Category?

I was looking for an easy way to add a page to any of my sites using MediaWiki.

How to add categories to any page in MediaWiki

Option 1: Easy Way (without the use of any extension)

Add [[Category: Category name]] to the bottom of the page to add that category to the specified category by the name “Category name”

  1. Open the page that you want to add a category to editing mode.
  2. Scroll down to the bottom of the page and add the following and save the page.

[[Category: Category name]]

Where ‘Category Name’ is the name of the category.

To put one page under many categories, just add more categories to the page below:

[[Category: Category name 1]]

[[Category: Category name 2]]

[[Category: Category name 3]]

Option 2: An easy way to use the extension

There are several extensions that you can use to add a page or article in a category in MediaWiki installed site.

You can only search category extensions for MediaWiki and try some of them.

I use the TagAsCategory extension and it’s great.

This gives you a small text box like the following screen shot to enter categories on your MediaWiki page.


Tag As Category

How to change the name of a category in the media wiki

I change the text extension to change the names of my categories.

The replace text extension provides a form so administrators can make string replacements on the entire wiki.

Change text extension

Changing the name of a category in the media wiki can be a bit painful, if you have a lot of existing references to that category, then the categories are not allowed to proceed (pages can be moved but not categories). As far as I know that Wikipedia uses a bot to change its category name. Which can be a little harder to achieve in your hands.

After installation, the extension can be used by navigating to ‘Special pages’ and ‘Replace text’. The replacement text is under the ‘Other Special Pages’ section.

I use this extension to find all the current versions of the current category name and replace it with the new category name.

All new category links will be broken at this level, but as soon as I create a new category page with the desired name, it will be good.

Finally, I delete the old category page to clean. Using this method will ensure that no page is still using the old category name.

Shares 0

Leave a Reply

Your email address will not be published. Required fields are marked *