I have a section in my website which uses MediaWiki. eg. sitename.com/codewiki/

It has been 3 years since I installed MediaWiki. Now i am getting errors so i wanted to upgrade to the latest version.

I created a temporary section like sitename.com/tempwiki/ and installed the latest release. It requested to upgrade the database, I said "yes" and it upgraded the db. Everything is fine. Now I wanted to change tempwiki to the actual live section codewiki. I could see in the database the path is hard coded like /root/.../sitename/tempwiki/uploads.

I am looking for is to upgrade a live site or to update the database with the directory name.

suggestions needed.


For what I undestood the /codewiki/ is still working with the old database, right? If so, back it up and do the upgrade process again on the live version. You already saw it's working in the /tempwiki/ so it should be fine.

By taking a look at Mediawiki's Upgrade Documentation, they address the live upgrading issue this way:

Can my wiki stay online while it is upgrading? Generally yes, however Git may temporarily (for a few seconds) break it.

If you are upgrading between minor releases of MediaWiki, all you need to do is update the source files.

Note: the following assumes you have command line access. If you are upgrading between major releases of MediaWiki, the preferred procedure is as follows:

  1. Unpack the new version of MediaWiki into a new directory
  2. Prepare that new directory: copy your current LocalSettings.php from the old directory, copy any installed extensions and custom skins (if any).
  3. In the release notes for the new version, see if any changes need to be made to LocalSettings.php.
  4. Place the database in read-only mode by inserting the following variable into LocalSettings.php in the old directory - users will see this message if they attempt an edit during the upgrade process: $wgReadOnly = 'Upgrading to MediaWiki 1.24.0';
  5. Run the update script or the web updater in the new directory.
  6. Copy the images from the images sub-directory from the old directory to the new directory.
  7. Swap the old directory and the new directory.

Seems like LocalSettings.php holds the information you need to edit in order to make it work.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.