I just installed and configured MediaWiki on Ubuntu Server 10.04. I've now copied the instance in /usr/share/mediawiki/ to a different directory to run as a separate instance, and would like to reset it to a clean state so that it takes me through initial configuration again.
How can I do this without uninstalling and starting again?
This should be as simple as just adding a second database to your MySQL (or chosen SQL system) and then resetting your config file to allow you to start the installation from scratch.
Place in the new details and then kickstart your install.
We're going to delete some files, so back them up first if you want a copy for later reference.
Short version:
Now open your wiki in a browser. It will walk you through initial setup again.
Long Version:
The default installation directory in Ubuntu server is /usr/local/mediawiki, softlinked from /var/www/mediawiki. If you have copied the directory elsewhere, just use that path instead in the following example. Depending on your user privileges, you may want to log in as root or sudo all of the following commands.
You should see a LocalSettings.php file. This is a real file or a symlink to /etc/mediawiki/LocalSettings.php, which you can delete instead if you prefer. If you are using multiple wikis, though, it is helpful to replace all of these symlinks with local copies.
rm -f LocalSettings.php
you should also see a config directory. If you don't you can create one thus:
Now you can remove the generated config file (which doesn't actually get used, just copied to the proper location)
Now if you hop over to your wiki in a browser, you will be prompted to go through initial setup again. This will generate the config/LocalSettings.php file again, allowing you to copy it to your install dir.
Under Ubuntu, I changed the permissions and the user to my web server user for security: