Page Import Application

Last modified by Manuel Leduc on 2023/05/16 15:46

cogImports a set of pages in a given syntax to another syntax
Developed by


Active Installs8
0 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager



The Page Import Application is meant to let you import remote pages into a wiki. Here's below a tutorial explaining how to import one or several Wikipedia page(s).

  • Installation: once the application itself is installed, you will need to install a parser for the MediaWiki syntax. To do so, from the XWiki Extension Manager, search for "MediaWiki" and install the latest stable version of the MediaWiki Syntax extension.
  • Head to the Page Import Application from the Applications menu. From there create a terminal XWiki page, for instance "Peekskill meteorite".
  • Add an XWiki object PageImport.Code.PageMetadataClass to that page, with the following uri property: "wikipedia:fr:Météorite_de_Peekskill".
  • From the application home page, click on Wikipedia Page Import, and make sure that the HQL query matches the page or set of pages that you want to import, and choose Yes for property Import images and other files as attachments, then save the page.
  • Click Import pages at the bottom of the page.
  • Visit the links showing up on the screen if all goes well: you should get a page with the imported and transformed content and one or several attachments. The transformed text lies within the extract macro so that you can keep track of the fact that the content was extracted from another site.

Technical notes

The application uses the HTTP Application to download resources over HTTP. In the case of MediaWiki pages for instance, a typical endpoint consists of the following scheme:{PAGE_IDENTIFIER}&action=raw, for example: wikipedia:fr:Météorite_de_Peeskill. Using the XWiki Rendering Module, it then transforms the downloaded text into the target syntax (XWiki syntax typically), and performs an additional optional set of transformations in order to convert the original macros into XWiki ones. The transformations are performed by processors implementing a PageImportProcessor interface. Images can also be downloaded by the application, they get attached to the target page, and are included in the transformed content using the XWiki Figure Macro.

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki


Dependencies for this extension (org.xwiki.contrib:xwiki-page-import-pages 1.0):

  • org.xwiki.contrib:xwiki-page-import-lib 1.0
  • org.xwiki.contrib:xwiki-macros-utils 0.1

Get Connected