User:MooMishka/Using GuildWiki Database Dumps

This page describes how to use the GuildWiki database dumps to create a locally-viewable "copy" of GuildWiki.

The following assumes that you know how to install and setup MediaWiki, MySQL, PHP as well as the web server under which MediaWiki runs (typically, Apache).

Basic procedure (Unix-only, as the image filenames contain names that windows cannot handle):


 * 1) Install and setup the MediaWiki software.  When you do this, you must set the mediawiki "Site Name" ($wgSitename) to "GuildWiki".  If you do not do this, some GuildWiki pages will not be accessible (example: the "Community portal" link will not work).
 * 2) Download and uncompress the GuildWiki dump.  Most people will want the "All articles" dump.  The following instructions will use the filename, "/tmp/gwiki_cur", as the name of the file that contains the uncompressed dump.
 * 3) Download the .zip file that contains the images for the dump, but do not yet extract the images.
 * 4) Make sure that MySQL has been started.  Also make sure that "AdminSettings.php" in the top-level MediaWiki directory contains the name and password of a MySQL user that can create databases (e.g., "root", if you're doing a private installation and are aware of the security issues).  If this file does not exist, use "AdminSettings.sample" as a template, and fill in the name and password.
 * 5) cd to the top-level MediaWiki directory, and run the command:     php maintenance/importDump.php < /tmp/gwiki_cur Note that this will take several hours to run.  Also, do not extract the image files before doing this step; doing so will cause importDump.php</tt> to take several more hours to run, because it will attempt to create all image thumbnails during the import.
 * 6) Now that the database import has finished, extract the images into the MediaWiki "images</tt>" subdirectory.  Note that you must preserve the directory structure in the images .zip</tt> file (don't give the "-j</tt>" option to unzip</tt>).
 * 7) Run the following commands in the top-level MediaWiki directory (e.g., if you're still in the "images</tt>" subdirectory, do "cd ..</tt>"):     php maintenance/rebuildImages.php    php maintenance/rebuildImages.php --missing    php maintenance/rebuildtextindex.php</tt> The first command will run very quickly (and may not be necessary), but the other commands will take several minutes to over a half-hour to run.
 * 8) Install the ParserFunctions extension.
 * 9) Start your webserver, if necessary, and browse to your MediaWiki/GuildWiki Main Page. Note that the GuildWiki Main Page will not be displayed; you will see the default MediaWiki Main Page, instead.  This is because the MediaWiki Main Page gets an "edit date" of when you installed MediaWiki, which will be later than the last "edit date" of the GuildWiki Main Page, and so the MediaWiki one will be displayed.
 * 10) To restore the GuildWiki Main Page: click on the "History" tab of the Main Page (not the "Edit" tab).  On the resulting page, click on the date of the bottommost history line (there should be only two).  This will temporarily display the old GuildWiki Main Page.  To make it permanently displayed, click on the "Edit" tab, and, once the edit page is displayed, click on "Save Page", near the bottom of the page.
 * 11) That's it.  Your local GuildWiki copy should now be functional.  Note, however, that displaying pages can be slow; this because, the first time a page is displayed, MediaWiki must render and cache certain parts.  Subsequent displays of the same page should be faster.