Note: The Hosted Apps Retirement is being delayed, we will update this page with a new retirement date when it's been decided on.
Post to your wiki's MediaWiki:Sitenotice that you will be moving your wiki, and that further edits will not be saved.
For Classic projects, you can get a backup from: Project Admin > Features > "Backups" row > "Hosted Apps"
For new or upgraded projects, it’s in: Admin > Tools > Hosted Apps, Admin Hosted Apps > backup link
Select the database option from the list of what you want to export. Then repeat, selecting the files option (select tar.gz compression for this). This will give you all your data, but also any files you may have uploaded to your wiki.
If these backup methods don't work for you, for whatever reason, you may need to get a backup from the shell, as described in Hosted Apps Backups via Shell
Project Admin -> Features and click on ‘Manage’ next to the MySQL option
Admin -> Tools -> Mysql
Make sure that you’ve set passwords for your various access accounts, and make note of your required database hostname and prefix for the following step.
scp the database dump to your account:
scp projectname_mediawiki_mysqldump.sql USERNAME@web.sourceforge.net:
log into your account via ssh:
ssh -t USER,PROJECT@shell.sourceforge.net create
Create a new database for your MediaWiki installation, using the database hostname and prefix noted in step 2 above.
mysqladmin -h mysql-r -u r12345admin -p create r12345_mediawiki
Load the database dump:
mysql -h mysql-r -u r12345admin -p r12345_mediawiki < ~/projectname_mediawiki_mysqldump.sql
Obtain the latest version of MediaWiki at http://www.mediawiki.org/wiki/Download
cd /home/project-web/PROJECT_NAME/htdocs wget http://download.wikimedia.org/mediawiki/1.19/mediawiki-1.19.3.tar.gz tar -vzxf mediawiki-1.19.3.tar.gz mv mediawiki-1.19.3 wiki rm mediawiki-1.19.3.tar.gz
Point your browser at http://PROJECT.sourceforge.net/wiki (or whatever you set your path to) to start the web installer.
Click through the screens until you get to the database screen. Select Mysql as your database type, and fill in the database information from step 3 above, using the RW user account.
Click Continue. You will see a screen that says:
There are MediaWiki tables in this database. To upgrade them to MediaWiki 1.19.3, click Continue.
Click Continue. If you receive an error on this step, go back and use the Admin user account instead.
On the next screen click the "Regenerate LocalSettings.php" button. Fill in the desired information on the screen to set up your new wiki settings. After filling out these screens, you will be prompted to download your LocalSettings.php file, which you should then upload to your wiki directory.
scp LocalSettings.php USERNAME@web.sourceforge.net:/home/project-web/PROJECTNAME/htdocs/wiki
Obtain a backup of your image files, using the same procedure outlined in step 3, selecting 'Files' rather than 'Database' this time.
Upload this file to the project web server, using either the command line or an scp/sftp client:
scp projectname_mediawiki_files.tar.gz USERNAME@web.sourceforge.net:
In the project web shell, unpack the files to the images directory of you wiki installation. In the backup, the images are in a subfolder projectname, so follow these steps:
cd /home/project-web/PROJECTNAME/htdocs/wiki mkdir oldimages cd oldimages tar -xvzf ~/projectname_mediawiki_files.tar.gz mv projectname/* ../images/ cd .. rm -r oldimages # Now fix permissions. Wrong permissions may cause a massive slowdown! chown yournick:apache images/ --recursive chmod 775 images/ --recursive
It may take a few pageloads for MediaWiki to regenerate any thumbnails that weren't in the backup. This is normal.
Edit LocalSettings.php and make the following changes:
To be able to send outbound email (eg, for password resets) set your outbound email authentication password as described at https://sourceforge.net/apps/trac/sourceforge/wiki/Project%20Web%20Email%20Configuration . Then add the following to the bottom of LocalSettings.php:
# Authenticated mail settings $wgSMTP = array( 'host' => 'prwebmail', 'IDHost' => 'PROJECTNAME.sourceforge.net', 'port' => 25, 'auth' => true, 'username' => 'PROJECTNAME', 'password' => 'PASSWORD' );
The logo shown in the sidebar is no longer stored as an object in the wiki (as it was in the Hosted App installation). Rather save it as a regular file, then change the value of $wgLogo:
$wgLogo = "$wgScriptPath/images/path/to/logo.png";
Set write permissions as restrictively as you can:
$wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['user']['edit'] = false; $wgGroupPermissions['admin']['edit'] = true;
Or possibly set 'user' to true, depending on how you want things done.
This will make it less likely that the general public can deface your wiki with spam.
Try reading an article, editing an article, reassigning user rights, uploading an image, creating and deleting a page, and also putting an image on an article. If all works fine, you can use MediaWiki again. If not, from the command line, in the maintenance directory, type in
$ php update.php --quick --force
This will reapply object permissions and may resolve rights problems.
To restore user permissions, tell your users to send themselves a password reset using the email address USERNAME@users.sourceforge.net
If you need any help with your wiki, please ask below and an expert will come to help you as soon as possible.