Howto:Install MediaWiki on 1and1
Howto:Install MediaWiki on 1&1
After hours of toil to download a 3.8MB wiki software zip file, uploading 12MB of the uncompressed files[1], then finding out that MediaWiki requires PHP5, and that 1&1 uses the .php5 extension for that so I needed to change my .htaccess file to map .php files to the PHP5 interpreter instead of PHP4, and then finding out that 1&1 also retardedly uses the /config directory to redirect to the administration login page, and that this supersedes any files that actually exist on the server, including .htaccess, then finding out that the installation script craps out if the /config directory doesn't exist[2], then going through the hassle to shorten the URLs through more .htaccess hacks so you don't end up with URLs like http://wiki.chrisretlich.com/wiki/index.php?title=Main_Page
, I finally have the wiki set up in a half-way decent fashion that appears to work now.
How to Really install MediaWiki on 1&1
- Download the zip file for MediaWiki (I used the 1.9.3 stable release).
- Unzip the files somewhere.
- Rename the "config" folder to "config2".
- Create a new folder named "config".
- Create a file named ".htaccess" and put it in the root folder of the unzipped files, this file should contain the text
AddType x-mapp-php5 .php
- You may also want to add
RewriteEngine On
andRewriteRule ^(.*)\&(.*)$ $1\%26$2
to allow URLs which contain the ampersand character (&).
- You may also want to add
- Upload the files to your webspace using some kind of FTP program. Use a separate folder for your files, such as /wiki/, and/or a different subdomain.
- Create a new MySQL database using the 1&1 control panel
- Copy the password, username, and server that you get on the confirmation screen
- You may want to change the password to something better
- Browse to the directory where you uploaded your files with a web browser, and then go to the /config2/ subdirectory, e.g. website.com/wiki/config2/ or wiki.website.com/config2/
- Fill out the form.
- Move the "LocalSettings.php" from the config folder up to it's parent folder.
- Put a 135x135px PNG logo in the images/ subdirectory, and add
$wgLogo = "/images/FILENAME.png";
to your LocalSettings.php file. - Your wiki might be ready to go!
URL shortening
If you want to employ the super-1337 URL shortening techniques, then add the following to your .htaccess file which you created earlier[3]:
DirectoryIndex index.php RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*) /index.php?title=$1 [L,QSA] RewriteRule ^$ /Main_Page [R]
You can also try this code instead:
DirectoryIndex index.php RewriteEngine On RewriteRule (images|skins)/ - [L] RewriteRule \.php$ - [L] RewriteRule ^$ /Main_Page [R] RewriteRule ^/?(.*)$ /index.php?title=$1 [L,QSA]
Or you can also get some more help on wiki URL shortening.
In addition, you'll want to add the following to your "LocalSettings.php" file[3]:
$wgScriptPath = ""; $wgArticlePath = "$wgScriptPath/$1";