Difference between revisions of "Wikispooks:Site Backup"

From Wikispooks
Jump to navigation Jump to search
(image)
(image and prettify)
Line 48: Line 48:
  
 
===Mandatory extensions===
 
===Mandatory extensions===
[[image:extension.png|right|40px]]
+
[[image:extension.png|left|40px]]
All the below extensions are needed for a functional and presentable site, listed in rough order of importance:
+
'''[[Wikispooks:Semantic Mediawiki|Semantic Mediawiki]]''' is the most important extension, as the site will not display any pages properly without it. However, all the below are needed for a fully functional and presentable site. In rough order of importance:
 
{|
 
{|
 
|
 
|
*[[image:extension.png|24px|link=Wikispooks:Semantic Mediawiki]][[Wikispooks:Semantic Mediawiki|Semantic Mediawiki]]  - '''NB''': The site will not display ANY pages without this extension.
+
*{{extension|Semantic Mediawiki}}
 
*{{extension|Semantic Forms}}
 
*{{extension|Semantic Forms}}
 +
|
 
*{{extension|Semantic Result Formats}}
 
*{{extension|Semantic Result Formats}}
 
*{{extension|ParserFunctions}}
 
*{{extension|ParserFunctions}}
 +
|
 
*{{extension|Scribunto}}
 
*{{extension|Scribunto}}
 
*{{extension|Cite}}
 
*{{extension|Cite}}
 +
|
 
*{{extension|Poem}}
 
*{{extension|Poem}}
 +
*{{extension|Widgets}}
 
|
 
|
*{{extension|Widgets}}
 
 
*{{extension|Gadgets}}
 
*{{extension|Gadgets}}
 
*{{extension|CategoryTree}}
 
*{{extension|CategoryTree}}
 +
|
 
*{{extension|No title}}
 
*{{extension|No title}}
 
*{{extension|MagicNoCache}}
 
*{{extension|MagicNoCache}}
 +
|
 
*{{extension|MiniMp3}}
 
*{{extension|MiniMp3}}
 
*{{extension|SubString and StrLen}}
 
*{{extension|SubString and StrLen}}
 
|}
 
|}
'''Note''' A few mandatory extensions are not listed above because they are included with a standard installation of one or more of those that are mentioned.
+
'''Note''' A few mandatory extensions are not listed{{which}} above because they are included with a standard installation of one or more of those that are mentioned.
  
 
===The 'LocalSettings.php' file===
 
===The 'LocalSettings.php' file===
Line 118: Line 123:
  
 
* '''Suggestions, Queries etc? - Either Email the admin (non-WikiSpooks members) or use [[WikiSpooks talk:Site Backup|this discussion page]]''' (WikiSpooks members)
 
* '''Suggestions, Queries etc? - Either Email the admin (non-WikiSpooks members) or use [[WikiSpooks talk:Site Backup|this discussion page]]''' (WikiSpooks members)
 
+
{{WikiSpooks Footer/Technical}}
 
[[Category:WikiSpooks Technical]]
 
[[Category:WikiSpooks Technical]]

Revision as of 09:26, 3 April 2015

SiteBackup.png

Even if you are a casual reader and not a contributor to this project, you are encouraged to download and keep a backup copy of the site database (~200 MB) and its associated files and images (~3 GB) in case this site goes offline for any reason. The site is open licenced so you are free to copy this information and publish it elsewhere, either as an exact mirror or as part of another website. The more people around the world who keep backups, the better the chances this information will not be lost.

Content of the 'Backups' directory

Be sure to check the dates in the Index of /backups box on the right. You will probably want those of the form *-latest.zip, since these are the most up to date.

File.gif LSadditions.txt     - text to add to the end of LocalSettings.php
File.gif Readme.txt     - a text rendering of this page
Compressed.gif files-YYYY-MM-DD.zip     - a ZIP file of the site images and files
Compressed.gif ws-YYYY-MM-DD.zip     - a ZIP file of the site database
Unknown.gif ws.sql     - uncompressed site database

Overview

To host Wikispooks on your machine, you will need:

  • Some knowledge of running a webserver
  • Some knowledge of the Mediawiki software
  • A site-backup set - The necessary backup files are listed above and here.
  • A computer with at least 5 Gb of free disk space that runs a web server, including
    • PHP v 5.3.3 +
    • MySQL v 5.1.73 +
    • Lua v 5.1.5 +

N.B. Either WampServer or Xampp provides the web-server software you need to run the Wikispooks site locally.

Setting up and running a Copy Of The Site

The backups enable you to import all the files, images and text-content of the site into 'Mediawiki'. Your first task is therefore to install Mediawiki and some mandatory Mediawiki extensions. A list of all installed site extensions is shown here. Many of them are mandatory for the site to work properly.

Mandatory extensions

Extension.png

Semantic Mediawiki is the most important extension, as the site will not display any pages properly without it. However, all the below are needed for a fully functional and presentable site. In rough order of importance:

Note A few mandatory extensions are not listed[Which?] above because they are included with a standard installation of one or more of those that are mentioned.

The 'LocalSettings.php' file

Successful installation of the Mediawiki software requires that you download an install-generated file called "LocalSettings.php", and put it into the Mediawiki root directory - usually /serverRoot/w/. The file is editable with any plain-text editor. The end of the file will contain the following text:

# End of automatically generated settings.
# Add more configuration options below.

The wikispooks site requires a number of custom configuration parameters, most notably to define new namespaces, extension statements, and permissions. The easiest way for you to include everything necessary is to copy/paste the contents of LSadditions.txt to the end of the auto-generated part of the file. However, note that LSadditions.txt includes ALL the wikispooks installed extension statements so, if you don't install ALL of them too, you may get errors reported. These can be dealt with by commenting out the corresponding extension statements.

Both the Mediawiki and extensions software, together with comprehensive installation instructions are available from here

Error reporting

If things don't go smoothly, adding the following lines to LocalSettings.php will give you some diagnostic output:

$wgShowExceptionDetails = true;
$wgShowSQLErrors = 1;

It's recommended to take these lines out once things are working OK.

Getting the wikispooks site files, images and content into Mediawiki

Once you have a working installation of Mediawiki, proceed as follows:

  • Unzip files-latest.zip in the web server root directory. This will generate many directories and files in and under the web server root.
  • Unzip ws-latest.zip in a convenient directory. This will will generate a file named "ws.sql"
  • Import this ws.sql database dump into the new database.
    • N.B. The file is too large for a default configuration of phpMyAdmin to handle. Try a MySQL command for this, e.g.
$ mysql -u username -p password -h localhost data-base-name < ws.sql

Finishing Touches

The procedure as explained above is sufficient for the database and all the files. There will be a number of Apache config parameters that need setting in order for 'pretty URLs' to work properly, such as a .htaccess file. Full details can be found on the Mediawiki web site.

Running A Live Site Mirror

If you have interest and resources to set up a realtime site mirror on your server, you are encouraged to do so. We may also be able to provide you with some technical assistance if needed. Requests for help setting up realtime mirrors should be addressed to admin[at]wikispooks.org and encrypted with this key.

Notes

The following items are not included in the backup:

Known Issues

  • Many of the in-text links (especially on 'Category:IFrame' pages) will take you to the master Wikispooks site. This is because urls which ought to be coded as relative, have in fact been entered as absolute urls. It is easy to manually change any such URLs in your browser address-bar at run time (simply replace 'https://wikispooks.com/' with 'localhost/your_root_dir_name/'. This issue will be addressed at source as and when.
  • Suggestions, Queries etc? - Either Email the admin (non-WikiSpooks members) or use this discussion page (WikiSpooks members)
Wikispooks logo.png Policy.png Wikispooks to do.png Tools2.png
Wikispooks
Technical
SMW.png Help.png