Here is how I upgraded from mediawiki version 1.5 to 1.8.
First follow the instructions on this page.
- PHP version
To find PHP version, I created a small file on the server. Called it phpinfo.php. Pasted this code in it:
<?php phpinfo() ?>
When called within a web browser it displays useful info about PHP on the server. I got : PHP Version 5.3.2-1ubuntu4.14. so I am good here
- My SQL version
Using webmin I can see that mysql is version 5.1.61. All set here too.
To backup the database, I used webmin’s Mysql module
To backup the file system I used this command on a shell
tar cvzf mediawiki.tar.gz /var/www/mediawiki
Delete old wiki files
This is something which I did but was not mentioned in the official upgrade procedure. I figured it will keep the install clean.
Delete the old files and directories except:
- the extensions/ directory
- the images/ directory
- any other directory where files have been uploaded [I had two other]
- the .htaccess file [there was none in my old install]
- the AdminSettings.php file [there was none in my old install]
- the LocalSettings.php file
It was easily done using webmin’s file manager. I can select multiple files by holding down control key and delete them.
Unpack new files
- I download version 1.8 and uploaded to /var/www/mediawikinew using webmin [clean location]
- I let webmin I extract the tar file during upload.
Then I used webmin to cut and paste the contents of the uploaded directory to the mediawiki directory.
I ran into problems here. File manager complained that two directories were already there [images and extensions] and wont overwrite them.
Since the new images folder has nothing in it. I ignore that problem.
I renamed the old extensions folder to extensions_old and copied over the new extensions folder.
Correct file permisions
After copying the stuff we need to make sure every folder under mediawiki has the correct permissions. Make everything writable by user and group called “www-data”
Copy over the extensions
I copied the old extensions
Commented out FCK editor by editing the localsettings.php file in mediawiki directory
# enabling FCK editor: # require_once("$IP/extensions/FCKeditor/FCKeditor.php"); # $wgUseAjax = 'true';
temporarily change user permissions
Since Apache runs as www-data and ‘maybe’ the user account you are using ‘admin’ to run these scripts does not belong to www-data group… you will get errors while running the scripts in the next section. especially while running the refreshlinks.php. That script creates sub directories under images. I was getting an error and found out how to solve it here.
To solve this issue… add www-data group to your admin account temporarily. After running the scripts you can revert this change back.
Run the update script
From a putty session to the server I ran the commands:
Correct file permisions again
While running the refreshlinks.php command some directories are created under the admin account. So lets change the permissions to make everything writable by user and group called “www-data” one more time.
We are using these extensions:
TO DO: Need to find out the latest versions of these and update them
TESTING the WYSIWYG editor : wikiEditor
Installation instructions are here