1. VW4
  2. Importing from MediaWiki
Printable Version

https://www.vaultwiki.org/pages/Help/VaultWiki-4-Manual/VW4:Importing-from-MediaWiki
This page is a chapter in VW4 Importing Data into VaultWiki

This page has been seen 759,621 times.

    • Created by on
You can import data into VaultWiki from an installation of MediaWiki versions 1.5 and higher.

Warning:Always back-up your database before performing an import into VaultWiki. If for some reason the import is unsuccessful, you may want to try again with the partial data removed. If you are unsure how to back-up your database, please consult your server administrator.


Modifying the Config File

Locate the file /vault/core/controller/import/config/vw.php.new and open it for editing.

Modify the $source array to point to your existing MediaWiki database.

Modify the $paths array to point to your existing MediaWiki images directory (it must reside on the same server). The localattach value can be ignored.

Warning:The source image directory must be set to the correct directory on the same server or wiki uploads may be imported with empty file contents.

If you have defined custom namespaces in MediaWiki's LocalSettings.php file that you wish to import, modify the $namespaces array accordingly.

If your MediaWiki namespaces were translated and have different names than the default values:
  1. Update the $namespaces array with the translated names.
  2. Translate the phrases that the forum will use for those namespaces. The phrases you may need to update include:
    • vw_mw_category_namespace
    • vw_mw_file_namespace
    • vw_mw_image_namespace
    • vw_mw_media_namespace
    • vw_mw_template_namespace

Note:For help translating forum phrases for your specific forum software, please refer to the documentation for that forum package.

Save your changes, and rename the file to vw.php (no .new).

Running the Import Script

From the VaultWiki Admin Panel, go to Content > Import/Export.

For "Source Format," select "MediaWiki." Click "Import," and the script will continue the import automatically. If you are prompted for additional information along the way, simply fill out the missing fields to continue the import.

Note:If your import is not successful or seems to hang at any point, please contact VaultWiki support before making another attempt or trying to re-import the data into VaultWiki. Trying to import over incomplete data could cause your wiki to behave strangely.

When the import is complete, you will be returned to the importer's landing page. Browse your wiki to determine that the import was successful. If any data is incomplete or was imported incorrectly, contact VaultWiki support before trying again.