Upgrading elgg

I am about to upgrade from 1.6 to 1.7. My concern is whether the upgrade will have issues if users are currently live on the site (or cause db issues). Should this be a concern... if so is there an easy way to put up a 'site under maintenance' message without causing conflicts with the upgrade script?

  • I had the same concern and had asked this question also. Unfortunately, I got the response from Cash that it might cause trouble if users are on your site although It's not very likely that something goes wrong. But you should make sure that you backup both your database and the data directory to make sure. The maintenance plugin seems useless for a site upgrade, because the instructions say to disable all non-core plugins.

    I did upgrade on Friday from 1.6.2 to 1.7.3 and fortunately everything went well.

    The best approach is to do the upgrade as fast as possible. Therefore I had prepared all files of the new version in a separate directory including the new version of .htaccess and also my settings.php file and also including a few non-core plugins that I wanted to upgrade at the same time.

    I also had tested Elgg 1.7.3 with all the plugins I use on a separate test installation before.

    I did the upgrade in the following way:

    • disable all caching (simple cache, filepath cache, vazco mainpage cache),
    • disable all non-core plugins and enable all core plugins,
    • then I did a backup of the database, the user directory and the old Elgg installation,
    • next I removed all files and directories of Elgg 1.6.2. I only left the non-core plugins in the mod directory I wanted to keep (you can also simply overwrite the old files but I wanted all deprecated files removed),
    • I believe as soon as you remove index.php in the root directory your site is not available for your users anyway,
    • then I moved all new files and directories of Elgg 1.7.3 from the other directory to my Elgg root directory. The last thing I copied were the files that belong to the root directory (.htacess, index.php etc.),
    • next I executed upgrade.php. Fortunately, it took only about 1 minute until it was finished including the restructuring of the data directory's users folder (much faster than I expected),
    • then I enabled the non-core plugins again, and lastly the caching.

    It took only about 15 minutes to complete the upgrade. I also did it at a time when I expected a minimum of users anyway. If you have well-behaved users you might also annouce the upgrade before and ask then to not post anything until you give them the "All systems go" after the upgrade is finished.

  • Thanks v much for the detailed explanation although I'm surprised that there no easier way. My site is based around a league so I will do it in the off season... fingers crossed!

  • If you test the upgrade first on a test site, you can do the upgrade with all your plugins enabled which saves a lot of time. My site upgrades normally take about a minute.

  • Or you can break the database connection first by editing the settings.php file, while you are FTP'ying the files. Later once file transfer is completed change the settings.php credentials to the original and run the upgrade.php