PmWiki / Upgrades
PmWiki is designed to make it easy to upgrade the PmWiki software without affecting your existing data files or installation. For most upgrades, you simply copy the files in the new release over your existing installation. Note for PmWiki 1.0 sites: Upgrading from 1.0.x to 2.0 requires more than simply copying the 2.0 software over the 1.0 installation. See Upgrading From PmWiki 1 for more details. Note: this page may have a more recent version, see PmWiki:Upgrades. Generic instructions1. Read the release notesPlease read carefully the ReleaseNotes before performing an upgrade, about the changes between your previous version and the new one. See if there are any significant changes or preparation tasks that must be handled before performing the upgrade. 2. BackupIt's always a good idea to have a backup copy of your existing PmWiki installation before starting. You can copy the entire directory containing your existing installation, or you can just make copies of the wiki.d/ directory and any other local customization files you may have created (e.g., 3. Download and extractDownload the version of PmWiki that you want from the download page. Extract the tar image using 4. CopyCopy the files in cp -a pmwiki-x.y.z/. pmwiki
Note that BSD systems will not have the -a option as a command-line argument for cp, but that's okay, since it's just shorthand for cp -dpR, so use that instead of -a. Some environments have an alias established for cp that enable interactive prompts before overwriting a file. To work around this specify the absolute path to cp, such as /bin/cp. On (some) FreeBSD servers and Mac OS X systems you need to use cp -Rpv pmwiki-x.y.z/. pmwiki
Alternatively, you can use rsync --dry-run -ahv --stats pmwiki-x.y.z/ pmwiki/
This will perform a trial run with no changes made but will show which files would be updated. To perform the actual update, remove the 5. Update customisations and recipesThat's it! Your base PmWiki installation is complete. Now use the PmWiki:Site Analyzer to determine which recipes could be updated to the most recent version. Unless you have made customizations to the (Local customizations should go in Note: Additional tips can be found on the PmWiki:Troubleshooting page. Upgrading from version 2.1.27 to 2.2.0Between the stable versions 2.1.27 and 2.2.0 there are a number of additions. Some of them may need changes to local config files or to wiki pages, and they are outlined here. For the full list of changes see the release notes. If you are upgrading from a 2.2.beta version, your wiki may already include these features.
Upgrading from version 2.2.0 to 2.2.145Note: this page may have a more recent version, see PmWiki:Upgrades. Some additions since version 2.2.0 may need changes to local config files or to wiki pages, and they are outlined here. For the full list of changes see release notes and change log.
Upgrading from version 2.2.145 to 2.3.0Note: this page may have a more recent version, see PmWiki:Upgrades. Version 2.3.0 requires PHP 5.3 or more recent. The new version includes a number of new features, some of which were previously provided by recipes. Here are the things to review when upgrading:
See also Release Notes for any changes between your previous version and the new one. If you have any questions or difficulties, please let us know.
Upgrading from version 2.3.0 to more recent versions2.3.15 GUI Edit Buttons changePart of these functions were rewritten to avoid 'unsafe inline' JavaScript. While default and most custom buttons should work without change, you should no longer need to url-encode some characters like % or add backslashes. If you have such buttons, you may need to update their declarations to strip the extra backslashes. Please contact us if you need assistance. 2.3.23 PmTokenThis version adds a session token to core edit, upload, attributes and other forms. This is a way to mitigate CSRF vulnerabilities. All core forms and elements have been updated and should work without change. Some installations might encounter the warning "Token invalid or missing" and the changes are not saved. This can be caused by custom edit or upload forms, automated scripts posting to the wiki, AJAX posting text or uploads used by some recipes, or partial upgrades where some core scripts haven't been updated. Most of these should be easy to update -- please check if you're using the latest recipe versions, or report such cases to us. To update custom forms:
If you have customized If you are unable to update your scripts, you can disable the PmToken functionality with this in config.php: $EnablePmToken = 0; # edit, upload, attributes, approveurls $PmFormEnablePmToken = 0; # PmForm If you have recipes or custom functions that make changes to the wiki, and you want to benefit from the built-in PmToken functions, see Functions#pmtoken. 2.3.31 PrintFmt()The function PrintFmt() was refactored to process markup and wiki pages before outputting HTML headers, which would allow for markup in headers, footers, sidebars included from the skin, and action pages like the Auth form, to configure $EnablePrePrintFmt = 0; If the new default mode is problematic on your wiki, please do let me know. 2.3.37 Site.EditForm, sortable, rowspanThe page Site.EditForm has been modified, if you have customized it, you may want to edit this page and after
FAQHow can I determine what version of PmWiki I'm running now? See version - Determining and displaying the current version of PmWiki (pmwiki-2.3.38). How can I test a new version of PmWiki on my wiki without changing the prior version used by visitors? The easy way to do this is to install the new version in a separate
directory, and for the new version set (in $WikiLibDirs = array(&$WikiDir, new PageStore('/path/to/existing/wiki.d/{$FullName}'), new PageStore('wikilib.d/{$FullName}')); This lets you test the new version using existing page content without impacting the existing site or risking modification of the pages. (Of course, any recipes or local customizations have to be installed in the new version as well.) Then, once you're comfortable that the new version seems to work as well as the old, it's safe to upgrade the old version (and one knows of any configuration or page changes that need to be made). This page may have a more recent version on pmwiki.org: PmWiki:Upgrades, and a talk page: PmWiki:Upgrades-Talk. |