HowTo: Install MediaWiki on a GoDaddy Value Plan
By Eric Hartwell - Last updated
May 4, 2007
Mediawiki is the
open-source wiki program that is used by
Wikipedia. Although GNU/Linux/Apache is
"suggested", it's supposed to run on "any web server" with
PHP
≥ 5 and MySQL ≥ 4. MediaWiki ships with an installation
utility which will enable you to install
configure it using your web
browser.
Due to problems with my previous host, I had to find a new home for my wiki.
I like to think of GoDaddy as the McBurgers of hosting and domains - they're
huge, they're everywhere, they're relatively cheap, and they're utterly
consistent. Just don't ask for anything that's not on the menu. Fortunately,
MediaWiki fits with just a little trim.
Set up a
Linux Economy Plan. You'll need to wait until the domain
is active and you can access your site via
www.my-domain-name.com.
Installation
MediaWiki has a fairly good
installation guide.
- Fresh
install
- Download the
MediaWiki installation files from MediaWiki.org.
- Upload the installation files to a suitable directory or subdirectory
on the server, such as
www.ehartwell.com/afj
- MediaWiki 1.9.3 needs PHP 5.
- By default on GoDaddy, files with a .php
extension run under PHP 4 and files with the
.php5 extension run under PHP 5.
-
Change the .htaccess file so .php files to
run under PHP 5.
-
Create a MySQL database for your wiki (see:
Create
a MySQL database)
- Run the MediaWiki configuration program in
/install-directory/config
- Example: http://www.ehartwell.com/afj/config
- MediaWiki installation detects ImageMagick
and configures itself to use the version in /usr/bin/.
Unfortunately, this is ImageMagick 5.5.6, which
is incompatible with MediaWiki 1.9.3.
- GoDaddy lets you
use ImageMagick version 6 instead. Edit
LocalSettings.php and set
$wgImageMagickConvertCommand
to /usr/local/bin/convert instead of /usr//bin/convert.
- After setup, a file called LocalSettings.php is created in the "config"
folder. Move this file to the main wiki folder.
- Verify that MediaWiki works as expected.
- In my case, the only problem was with the
ImageMagick version.
- When you're done, delete the config directory to prevent security problems.
Copying an Existing Wiki
Transferring the wiki is fairly painless, if you start
with a clean MediaWiki installation. Follow the steps above, then
continue with the transfer below.
If you want to
upgrade your MediaWiki version, it's a good idea to do
the upgrade on the old site first so you can troubleshoot
version upgrade problems separately from site change
problems.
- Transfer the MediaWiki database
- Export the original wiki's database using
phpMyAdmin.
- Upload the databse dump file to the new server.
- phpMyAdmin will import files up to 2M in
size (This applies to the zipped size if you
compress your dump).
- If you're transferring a wiki of any size,
you'll probably run into phpMyAdmin's 2M file-size limitation. Use
BigDump,
which automates the staggered import of large
and very large MySQL Dumps.
- On my import, I ran into the Bigdump error,
"current query includes more than 300 dump
lines". Go back to the original installation,
and in phpMyAdmin Clear the "Extended inserts"
check box before doing the export.
- Depending on the format of the source dump,
you may need to delete all tables in the
database before starting the load.
- Transfer the MediWiki customization and images
- MediaWiki still stores its image files outside
the database. Copy the contents of the wiki/images
directory and all its subdirectories. It's OK to
overwrite whatever's already there on the new
server.
- Copy your custom site code, if any
- wiki/extensions if you're using any
extensions
- wiki/skins if you've customized any of the
skins
- Copy any other custom files, other than
LocalSettings.php
- Customize LocalSettings.php
- The configuration program already set the
appropriate server and database settings in
LocalSettings.php. You don't want to overwrite these
with settings from your old wiki.
- Edit LocalSettings.php and copy over any site
customization from your old server's
LocalSetttings.php. Keep a backup, and be careful
not to overwrite any site-specific settings.
- Verify that everything works as expected.
- If you use absolute URLs in the wiki, such as
for images in style sheets, make sure the targets
are correct.
Now your very own MediaWiki is running.
See also: HowTo: Install MediaWiki on IIS
Shared Hosting