I have a bunch of articles written on the mediawiki. Some of the articles are too long and complex, and are good candidates for splitting up so some chapters will form a distinct articles.

OTOH some articles are too small and too similar to be stored separately - I'd like to join them together into one meta-article, containing contents of the smaller ones as chapters.

I can do it with manually by copying & pasting source for each article. It is doable, but I'll need to manually promote/demote heading levels on pasted articles. And also I will need to deal manually with links, that will inevitably get broken.

Since mediawiki is so mature I guess there must be more a more efficient way of managing its content. But I can't google it up. Can anyone help, please?


1 Answer 1


As far as I know, there is no specific tool to do what you ask for — or, rather, manually copying and pasting the text is the tool for that.

However, there are some features in MediaWiki that can help with some of the issues you list, particularly link breakage:

  • When you merge a stand-alone page into another as a section, you can replace the original page with a section redirect like this:

    #REDIRECT [[New combined page#Section heading]]

    That way, anyone following a link to the original page will be automatically sent to the correct section on the new page.

  • When you rename a section, any existing direct links to that section will stop working. (They'll just take you to the top of the page, since the fragment identifier no longer exists on the page.)

    However, as a workaround, you can introduce an explicit identifier into the page using the HTML id attribute; these are most conveniently placed on an empty span or div just before the section you want the link to lead to, like this:

    <div id="Old section title" />
    == New section title ==

    You can also use this trick to include abbreviated identifiers for sections with long titles, or even to allow section-style linking to any arbitrary position on a page.

  • Finally, if you want to split sections of a long page into separate pages, it's often convenient to leave a summary page at the original location, with links to all the new pages. If you retain the section structure of the original page, but just reduce each section to a brief summary (+ a link to the full text on another page), even old section links will continue to work.

    Wikipedia uses this technique extensively: most Wikipedia articles on large general topics are written in summary style (of which the page I linked to is itself an example), with short (often single-paragraph) sections starting with a link to a more detailed article, like this:

    == Subtopic X ==
    : ''Main article: [[Subtopic X]]''
    A very brief description of subtopic X as it relates to the main topic
    of the page...

    (Except that they actually normally use a template for the "main article" link.)

Also, if you do find yourself needing to manually edit pages to fix link targets, there are some third-party tools like AutoWikiBrowser that can be useful. In particular, the AWB Disambig tool could be useful in retargeting links to a split page. While it's designed for fixing links to Wikipedia disambiguation pages, I don't see any reason why it couldn't handle your use case just as well.

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.