* wordpress: diff files upgrade manual

Posted on August 29th, 2007 by Alex. Filed under Projects.


If there is new wordpress version coming out, it is necessary to update the blog software due to security reasons. But overwriting the files as it says in the upgrade manual of wordpress, can cause a lot of work. Especially if changes have been made to the software to customize it. Mark always provided diff-files to update only those lines in the source code, which have changed. Unfortunately it seems that he does not continue in putting them online. Therefore I made them by myself and I will provide a download for the latest updates.

Upgrade Instructions

  1. Backup your wordpress directory. If you have SSH access you can do it by typing
    tar cfj backup_Wordpress.tar.bz2 wordpress/
  2. Copy the .diff file in the installation directory of your wordpress software.
  3. Check, if the .diff file can be applied successfully:
    patch -p2 --dry-run -i patchFile.diff

    Parameters:
    -p2: Do not consider the first 2 directories given in the location where to find the file. It will omit the “version_number/wordpress” directory.
    –dry-run: Do not make any changes, just pretend. Good for error checking.
    -i: The name of the patch file

    • If you do not have the patch executable, try this one. If it does not work, ask your system administrator or web hoster for an alternative or to provide this function.
    • If there are errors which look like this:
      patching file wp-content/plugins/akismet/akismet.php
      Hunk #1 FAILED at 57.
      Hunk #2 FAILED at 77.
      Hunk #3 succeeded at 83 with fuzz 1 (offset -21 lines).
      2 out of 3 hunks FAILED -- saving rejects to file
      wp-content/plugins/akismet/akismet.php.rej

      then patch could not find the hooks to apply the changes. Problems will be saved in the .rej files and should be examined carefully to get to know what went wrong. Since this is a dry-run there will be no .rej file here.

  4. If the dry-run was successful, apply the patch by
    patch -p2 -i patchFile.diff
  5. Check your blog, if the patch has been applied successfully.



Trackback URI | Comments RSS

Leave a Reply


RSS Feeds:

Search:


Pages:

Categories:

Archives: