Difference between revisions of "MediaWiki/archive/mirroring on a laptop"
m (navbar) |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
==Overview== | ==Overview== | ||
For reasons which I'll explain later, I wanted to have a copy of one of my wikis on a laptop so I could refer to it in a situation where I might not have Internet access. This meant installing [[Apache]], [[PHP]], and [[MySQL]], and getting them all working together – things which are more commonly handled by the web hosting service – so it may be useful to make notes about what happened. | For reasons which I'll explain later, I wanted to have a copy of one of my wikis on a laptop so I could refer to it in a situation where I might not have Internet access. This meant installing [[Apache]], [[PHP]], and [[MySQL]], and getting them all working together – things which are more commonly handled by the web hosting service – so it may be useful to make notes about what happened. | ||
Line 15: | Line 13: | ||
==Copying the site== | ==Copying the site== | ||
− | Download a copy of your MediaWiki installation (so you are using the same version), and [[ | + | Download a copy of your MediaWiki installation (so you are using the same version), and [[MySQL/migration|export the database]] to a .sql file. |
+ | |||
==Tidying up== | ==Tidying up== | ||
− | + | I haven't been able to figure out the necessary configuration mods to port a site which was at http://<u>domain</u>/ to http://<u>machinename</u>/<u>subdir</u>; I wasn't able to get the rewrite engine to act like it was working. What I did finally do that worked is upgrade to the latest MediaWiki, which generated fresh configuration files. (Reinstalling the same version should work too.) Things to remember: | |
+ | * Save your image folder (I call mine "wikiup", for wiki uploads, to distinguish it from the images used by MediaWiki) | ||
+ | * Make sure your image folder globally-writable (chmod 777 wikiup) so MediaWiki can write thumbnails and new images | ||
+ | * Change the $wgUploadPath and $wgUploadDirectory settings in LocalSettings.php so they point to wikiup (or whatever you call yours) | ||
+ | * Save any skins/ modifications or custom skins so you can restore them -- especially your wiki's logo | ||
+ | * Be sure to copy your backed-up wikiup folder back where it belongs, after modifying LocalSettings.php and before trying to access any images (if you try to access images when they're not there, the database will become confused and may require a maintenance script to be run -- more about this later when I have a chance) |
Latest revision as of 17:02, 4 November 2024
Overview
For reasons which I'll explain later, I wanted to have a copy of one of my wikis on a laptop so I could refer to it in a situation where I might not have Internet access. This meant installing Apache, PHP, and MySQL, and getting them all working together – things which are more commonly handled by the web hosting service – so it may be useful to make notes about what happened.
This page is still in progress, as I haven't got the installation completely working yet.
The Environment
I started with Ubuntu 6.06 running on a Sony Vaio F650 laptop (Intel P3-600, 128 MB).
Things to install (I used Synaptic for these):
- Apache
- MySQL
- php5
- php5-mysql, the MySQL module for PHP 5
Copying the site
Download a copy of your MediaWiki installation (so you are using the same version), and export the database to a .sql file.
Tidying up
I haven't been able to figure out the necessary configuration mods to port a site which was at http://domain/ to http://machinename/subdir; I wasn't able to get the rewrite engine to act like it was working. What I did finally do that worked is upgrade to the latest MediaWiki, which generated fresh configuration files. (Reinstalling the same version should work too.) Things to remember:
- Save your image folder (I call mine "wikiup", for wiki uploads, to distinguish it from the images used by MediaWiki)
- Make sure your image folder globally-writable (chmod 777 wikiup) so MediaWiki can write thumbnails and new images
- Change the $wgUploadPath and $wgUploadDirectory settings in LocalSettings.php so they point to wikiup (or whatever you call yours)
- Save any skins/ modifications or custom skins so you can restore them -- especially your wiki's logo
- Be sure to copy your backed-up wikiup folder back where it belongs, after modifying LocalSettings.php and before trying to access any images (if you try to access images when they're not there, the database will become confused and may require a maintenance script to be run -- more about this later when I have a chance)