# Wolf CMS - INFORMATION ABOUT UPDATING


## GENERAL ##

Please be aware that we only support single version upgrades.

IMPORTANT - always check your security by viewing security.php post update!


### Upgrading from 0.8.2 => 0.8.3 ###

SECURITY UPDATE - This release is a security release.

There are no database changes in this release, only code changes.

Index.php needs replacing only because it contains the updated version number, either
replace the file or update the version number by hand.


### Upgrading from 0.8.1 => 0.8.2 ###

SECURITY UPDATE - This release contains a one-file security patch.

There are no database changes in this release and only one file contains code changes,
so you can upgrade by simply replacing wolf/plugins/archive/archive.php and index.php.

Index.php needs replacing only because it contains the updated version number, either
replace the file or update the version number by hand.


### Upgrading from 0.8.0 => 0.8.1 ###

IMPORTANT - Make absolutely sure you have 0.8.0 before doing this.

There are no database changes in this release, so you can upgrade by
simply replacing all the Wolf CMS files, including of course index.php.

Remember to backup everything! Better safe than sorry!


### Upgrading from 0.7.8 => 0.8.0 ###

IMPORTANT - Make absolutely sure you have 0.7.8 before doing this.

There are no database changes in this release, so you can upgrade from 0.7.8 by
simply replacing all the Wolf CMS files, including of course index.php.

Remember to backup everything! Better safe than sorry!


### Upgrading from 0.7.7 => 0.7.8 ###

IMPORTANT - Make absolutely sure you have 0.7.7 before doing this.

Short explanation: you can upgrade from 0.7.7 by simply replacing all the
                   Wolf CMS files, including of course index.php. Afterwards you
                   visit .../wolf/install/ to do the DB upgrade.

Longer explanation:

  1. Create a backup of your files AND database. Especially save your config.php file!

  2. Login to your old installation and disable all of your plugins.

  3. Delete everything from your old Wolf installation.
     - NOTE: You can leave your public directory in place.

  4. Extract the 0.7.8 download as if you would install it normally.

  5. Make sure to rename the "_.htaccess" file if desired and check its settings
     against your backup.

  6. Copy your OLD config.php into your new 0.7.8 installation, overwriting the
     empty default.

  7. Visit http://www.example.com/wolf/install/ and follow the
     instructions to upgrade your database.

  8. Visit http://www.example.com/security.php to view the security advisory.

  9. Test your new installation.

  10. Copy back your third party plugins, if any.

  11. Enable and test each third party plugin *one by one*.

  12. Clean up by removing the wolf/install & docs directories as well as
      README.MD, CONTRIBUTING.MD and security.php files.

Upgrade Notes:

1. Without knowing your layouts and snippets, if you have references to
   "$this->url" or "$this->uri()" in your navigation related code, you should
   probably change it into "$this->path()". That should fix potential problems
   with highlighting the active page in your menu for example.


### Upgrading from 0.7.5-sp1 => 0.7.6 or 0.7.7 ###

IMPORTANT - Make absolutely sure you have 0.7.5-sp1 before doing this.
(due to a bug in the 0.7.6 release, it is advised to upgrade to 0.7.7)

You can upgrade from 0.7.5-sp1 by simply replacing the Wolf CMS files. No database changes required.
Make sure you have a backup of your files though.

Upgrade Notes:

1. If you see "MISSING_DEFAULT_STRING", it means that no "translation" was found for a string in en-message.php

This is most likely caused by either a missing translation string or a missing en-message.php file for a plugin.

2. Without knowing your layouts and snippets, if you have references to "$this->url" in your navigation related code,
   you should probably change it into "$this->path()". That should fix potential problems with highlighting the active page in your
   menu for example.


### Upgrading from 0.7.x => 0.7.5 (ONLY!) ###

IMPORTANT - Make absolutely sure you have 0.7.x before doing this.

1. Create a backup of your files AND database. Save your config.php file!

2. Login to your old installation and disable ALL of your plugins.

3. Delete everything from your old Wolf installation. (Make sure you did step 1!)
    - You can leave your public directory in place.

4. Extract the 0.7.5 download as if you would install it normally.

5. Make sure to rename the "_.htaccess" file if desired and check its settings against your backup.

6. Copy your OLD config.php into your 0.7.5 installation, overwriting the empty default.

7. Copy back your third party plugins.

8. Execute the following SQL on your database.

INSERT INTO permission (id, name) VALUES (26, 'backup_restore_view')
INSERT INTO role_permission (role_id, permission_id) VALUES (1, 26)
INSERT INTO role_permission (role_id, permission_id) VALUES (2, 26)

9. Re-enable and test each plugin one by one.
   (make sure you at least re-enable the File Manager and Archive plugins to enable their new settings)

10. Test your upgraded installation.

11. Visit http://www.example.com/security.php to view the security advisory.

12. Clean up by removing the wolf/install & docs directories as well as readme.txt and security.php



### Upgrading from 0.6.0 => 0.7.0 (ONLY!) ###

IMPORTANT - Make absolutely sure you have 0.6.0 before doing this.

1. Create a backup of your files AND database. Save your config.php file!

2. Login to your old installation and disable all of your plugins.

3. Delete everything from your old Wolf installation. (Make sure you did step 1!)
    - You can leave your public directory in place.

4. Extract the 0.7.0 download as if you would install it normally.

5. Make sure to rename the "_.htaccess" file if desired and check its settings against your backup.

6. Copy your OLD config.php into your 0.7.0 installation, overwriting the empty default.

7. Visit http://www.example.com/wolf/install/index.php and follow the instructions to upgrade your database.

8. Visit http://www.example.com/security.php to view the security advisory.

9. Test your new installation.

10. Copy back your third party plugins.

11. Enable and test each third party plugin one by one.

12. Clean up by removing the wolf/install & docs directories as well as readme.txt and security.php

### Known issues with Wolf CMS 0.7.0

- Snippet and Layout reordering does not work on IE8.



### Upgrading from 0.5.5 => 0.6.0 (ONLY!) ###

These are version specific notes. Please see www.wolfcms.org/wiki/upgrading for
a more detailed general upgrade scenario. Follow that (or your own) and apply
the following version specific notes.

Make sure to update your htaccess file.

Apply the following database changes:

- Add a field to the 'user' table;
    language varchar(40) default NULL

- Add a table called 'cron';
    CREATE TABLE cron (
        id int(11) unsigned NOT NULL auto_increment,
        lastrun text,
        PRIMARY KEY  (id)) ENGINE=MyISAM  DEFAULT CHARSET=utf8


## TROUBLESHOOTING / NOTES ##

It is recommended for security purposes to delete the following:
    - the wolf/install/ directory
    - the docs/ directory
