Upgrade Guide
=============

This document will guide you through upgrading your copy of HiveMail™.
If at any time you are stuck or feel like you need help, please do not
hesitate and contact us at support@hivemail.com or submit a new support
ticket for help.

You can view an online version of this document at
hxxp://manual.hivemail.com/topic/upgrade


TABLE OF CONTENTS:
------------------

  Step 1: Preparations and Uploading Files
  Step 2: Upgrading the Email Gateway
  Step 3: Upgrading the Database
  Step 4: Upgrading the Templates
  Appendices
    Upgrading from the Downloadable Trial



STEP 1: PREPARATIONS AND UPLOADING FILES
----------------------------------------

  After downloading the HiveMail™ zip archive from the Members Area,
  unpack the files in it to your computer, ensuring that you maintain
  the directory structure. (A tool such as WinZIP will get the job done
  -- make sure you check the 'Use Folder Names' option when extracting
  the files.) You should now have two folders, email and upload, and
  two files, called INSTALL and UPGRADE (the latter contains the same
  instructions that appear in the Upgrade Guide in this manual).
  
  After unpacking the files, you need to upload them to your Web
  server. Log on to your site using your favorite FTP client, and
  browse to the folder at which HiveMail™ is installed. You need to
  upload all files from the local /upload folder to the remote folder,
  overwriting any files that are already in it (the files you are
  overwriting are from the previous release of HiveMail™, and are
  outdated).



STEP 2: UPGRADING THE EMAIL GATEWAY
-----------------------------------

  Note: This step only needs to be taken if you are using the Pipe
  Gateway, or the POP3 Gateway in combination with a cron job.
  
  Besides updating the Web interface files, you also need to update the
  file called hivemail_process.php or pop.cron.php that fetch the
  messages from your server. The new version of this file is located in
  the /email folder you unpacked from the ZIP archive earlier. Again,
  connect to your Web site with your FTP client, find the location of
  the current file and overwrite it with the new version of it. Before
  uploading the new file, please open it in a text editor (such as
  Wordpad) and make sure the path to HiveMail™ is set correctly, or the
  system will not function correctly. (You may also need to change the
  shebang - the first line in the file - to reflect the path to PHP on
  your server. In most cases you should not need to modify this, but if
  you had to do so when you first installed HiveMail™, you will need to
  do so again.)
  
  After uploading the file, CHMOD it to 755 (in visual FTP clients this
  can usually be done by right-clicking on the file and choosing the
  appropriate option).



STEP 3: UPGRADING THE DATABASE
------------------------------

  Now that the files are on your Web server, you are ready to run the
  upgrade script. To do so, point your browser to the upgrade.php file
  under the /install folder - for example, if the program is installed
  at http://www.example.com/hivemail/, you should go to
  http://www.example.com/hivemail/install/upgrade.php. After each and
  every step you will see a link at the bottom of the page with an
  arrow, click it to proceed to the next step.
  
  In the welcome screen of the script you will be given a list of
  versions you can upgrade from - the version of HiveMail™ you are
  currently running. The script will display one option in bold, and
  that's the version you are running according to your database. After
  choosing the correct version, the script will create new tables in
  your database and change or remove current tables. Afterwards the
  script will populate the database with new records or add update
  current records (such as default options, user groups, etc).



STEP 4: UPGRADING THE TEMPLATES
-------------------------------

  When you ran the upgrade script (in Step 3) all default templates in
  your system were overwritten by the new templates from the updated
  version. If you have customized any templates, your custom versions
  were not overwritten, but they may need to be updated to continue
  functioning with the new version of HiveMail™.
  
  To find a list of templates that need to be examined for changes, go
  to
  http://www.yoursite.com/hivemail/admin/template.php?cmd=upgrade
  where /hivemail is the path to HiveMail™ on your domain.
  
  On this screen you will be presented with a list of templates that
  you have customized, and that have had their default versions changed
  during the last upgrade. You can revert all templates here, but you
  will lose any customizations you have made. Instead, we suggest you
  visit the template editor in the admin control panel and find all
  templates you have customized that need to be upgraded. (They will be
  listed in red.) Next to each custom template you will see a [compare
  to original] link. Clicking it will bring up the template comparison
  screen where you can see, side by side, the custom and original
  template. Compare the two templates and make the necessary changes to
  the custom template (on the left). When you are done, click the Update
  Custom Template button to submit the changes.



APPENDICES
----------

  This section contains the appendices for the Upgrade Guide, which
  contain additional information that you may find helpful.



UPGRADING FROM THE DOWNLOADABLE TRIAL
-------------------------------------

  To upgrade from the trial to the full version, simply upload all of
  the full version files, overwriting the demo files already on your
  server, with the exception of /includes/config.php as it is the same
  in both versions.
  Please note: If you have a different version of the demo than of the
  full version you are upgrading to (i.e. Trial v1.2 but Full Version
  1.3) then you will need to follow the normal upgrade instructions.