On Wikipedia, is it possible to automatically merge multiple existing categories into a new category (for example, automatically moving all items in the category [[Flying animals]] and [[Birds]] to the category [[Flying birds]])? (i.e., all items that belonged to both of those categories would be moved to the new category).

  • This idea occurred to me today because I've been sorting through some overcrowded categories on Wikipedia (which need to be sub-divided into more specific categories), and I've been searching for a way to automatically categorize items based on the categories that they already belong to. Commented Mar 29, 2013 at 15:29
  • 4
    Probably, but such a merger would have to be discussed at Categories for Discussion before anything happened.
    – ale
    Commented Mar 29, 2013 at 15:51

1 Answer 1


Yes, it is possible, but not directly on Wikipedia itself. You would need to use Pywikipedia for this.

There is a script in Pywikipedia called category.py. Lets say "foo" is the original category and "bar" is the category you want to merge into. Use the following command:

python category.py move -from:"foo" -to:"bar"

This would move all the pages in the "foo" category to the "bar" category. So, if you have multiple categories to merge, you would have to run this script multiple times for all the categories you have.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.