upgrading.rst 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. Upgrading Elgg
  2. ##############
  3. Switch a live site to a new version of Elgg.
  4. If you've written custom plugins, you should also read the developer guides for
  5. :doc:`information on upgrading plugin code </guides/upgrading>` for the latest version of Elgg.
  6. Advice
  7. ======
  8. * **Back up your database** and code
  9. * Mind any version-specific comments below
  10. * Upgrade only one minor version at a time (1.6 => 1.7, then 1.7 => 1.8)
  11. * Try out the new version on a test site before doing an upgrade
  12. * Report any problems in plugins to the plugin authors
  13. * If you are a plugin author you can `report any backwards-compatibility issues to GitHub <issues_>`_
  14. .. _issues: https://github.com/Elgg/Elgg/issues
  15. Basic instructions
  16. ==================
  17. #. **Back up your database, data directory, and code**
  18. #. Download the new version of Elgg from http://elgg.org
  19. #. Update the files
  20. * If doing a patch upgrade (1.9.x), overwrite your existing files with the new version of Elgg
  21. * If doing a minor upgrade (1.x), replace the existing core files completely
  22. #. Merge any new changes to the rewrite rules
  23. * For Apache from ``install/config/htaccess.dist`` into ``.htaccess``
  24. * For Nginx from ``install/config/nginx.dist`` into your server configuration (usually inside ``/etc/nginx/sites-enabled``)
  25. #. Merge any new changes from ``settings.example.php`` into ``settings.php``
  26. #. Visit http://your-elgg-site.com/upgrade.php
  27. .. note::
  28. Any modifications should have been written within plugins, so that they are not lost on overwriting.
  29. If this is not the case, take care to maintain your modifications.
  30. From 1.10 to 1.11
  31. ========================
  32. Breaking changes
  33. ----------------
  34. In versions 1.9 and 1.10, names and values for metadata and annotations were not correctly trimmed
  35. for whitespace. Elgg 1.11 correctly trims these strings and updates the database to correct
  36. existing strings. If your plugin uses metadata or annotations with leading or trailing whitespace,
  37. you will need to update the plugin to trim the names and values. This is especially important if
  38. you are using custom SQL clauses or have hard-coded metastring IDs, since the update might change
  39. metastring IDs.
  40. From 1.8 to 1.9
  41. ===============
  42. Elgg 1.9 is a much lighter upgrade than 1.8 was.
  43. Breaking changes
  44. ----------------
  45. Plugins and themes written for 1.8 are expected to be compatible with 1.9
  46. except as it pertains to comments, discussion replies, and notifications.
  47. Please `report any backwards compatibility issues <issues_>`_ besides those just listed.
  48. Upgrade steps
  49. -------------
  50. There are several data migrations involved, so it is especially important that you
  51. **back up your database and data directory** before performing the upgrade.
  52. Download the new version and copy these files from the existing 1.8 site:
  53. * ``.htaccess``
  54. * ``engine/settings.php``
  55. * any 3rd-party plugin folders in the ``mod`` directory
  56. Then replace the old installation directory with the new one. This way you are
  57. guaranteed to get rid of obsolete files which might cause problems if left behind.
  58. Follow the basic instructions listed above.
  59. After you've visited ``upgrade.php``, go to the admin area of your site.
  60. You should see a notification that you have pending upgrades.
  61. Click the link in the notification bar to view and run the upgrades.
  62. The new notifications system delivers messages via a minutely cron handler.
  63. If you haven't done so yet, you will need to :doc:`install and configure crontab </admin/cron>`
  64. on your server. If cron jobs are already configured, note that the scope of
  65. available cron periods may have changed and you may need to update your current crontab
  66. to reflect these changes.
  67. Time commitment
  68. ---------------
  69. Running all of the listed upgrades `took about 1 hour and 15 minutes`__
  70. on the Elgg community site which at the time had to migrate:
  71. * ~75,000 discussion replies
  72. * ~75,000 comments
  73. * ~75,000 data directories
  74. __ https://community.elgg.org/discussion/view/1819798/community-site-upgraded
  75. You should take this only as a ballpark estimate for your own upgrade.
  76. How long it takes will depend on how large your site is and how powerful your servers are.
  77. From 1.7 to 1.8
  78. ===============
  79. Elgg 1.8 is the biggest leap forward in the development of Elgg since version 1.0.
  80. As such, there is more work to update core and plugins than with previous upgrades.
  81. Updating core
  82. -------------
  83. Delete the following core directories (same level as _graphics and engine):
  84. * _css
  85. * account
  86. * admin
  87. * dashboard
  88. * entities
  89. * friends
  90. * search
  91. * settings
  92. * simplecache
  93. * views
  94. .. warning::
  95. If you do not delete these directories before an upgrade, you will have problems!