1
irmtfan
How to Upgrade and Downgrade a xoops module
  • 2013/5/1 2:34

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


Today i wrote this for userlog. but it can be followed for any other xoops module.
Quote:

To Upgrade
==========================
1- Close your website. (highly recommended) be sure you be logged in.
2- Get a backup from your old userlog database.(all XOOPSPREFIX_mod_userlog_* tables)
3- Get a backup from your old XOOPSROOT/modules/userlog folder.
4- IF EXIST get a backup from your all old userlog custom templates in themes folder located in XOOPSROOT/themes/MY_THEME/modules/userlog. eg: XOOPSROOT/themes/default/modules/userlog
5- Go to userlog > preferences and set the module log status as Idle.
6- Delete your old userlog folder located in modules. (Do not rename it. Only delete will work and while you have the backup you should not worry about anything)
7- IF EXIST delete all old userlog custom templates in themes folder located in XOOPSROOT/themes/MY_THEME/modules/userlog. eg: XOOPSROOT/themes/default/modules/userlog
8- Upload the most recent version of userlog to XOOPSROOT/modules/userlog (upload the compressed file and decompressed via Cpanel is the best way to insure all files are correctly uploaded)
9- Go to your admin > system > modules > userlog -> update (important: wait until you see the report page. It is better to save this page for future review)
10- Go to system > maintenance > clear all caches
11- Change the default settings to your desired in the module preferences. Do not forget to back the module log status to Active.
12 - Do not forget to open your website again.

What you should not do in upgrade:
----------------------------------
- Do not install the most recent version and import the old database backup and try to update it in admin. (Do not do it in any other xoops module too otherwise it will not work correctly after upgrade)
It will not work because Xoops store other information from modules like the module version in some other tables like _modules table and you just import the module tables and not this other information.
- Do not rename the old userlog folder to something like userlog_old. because xoops system will find any folder inside modules folder and try to take it as a new module.
- Do not save your old custom template. instead try to implement your changes in templates in the new template.

To Downgrade (To Restore the old version if the upgrade goes wrong)
===================================================
1- Close your website. (highly recommended) be sure you be logged in.
2- IF YOU CAN Go to userlog > preferences and set the module log status as Idle.
3- Delete the most recent bad working userlog folder located in modules. (Do not rename it.)
4- Drop the most recent bad working userlog database. (all XOOPSPREFIX_mod_userlog_* tables)
5- IF EXIST delete all userlog custom templates in themes folder located in XOOPSROOT/themes/MY_THEME/modules/userlog. eg: XOOPSROOT/themes/default/modules/userlog
6- Upload your previous working version of userlog to XOOPSROOT/modules/userlog (upload the compressed file and decompressed via Cpanel is the best way to insure all files are correctly uploaded)
7- Import your previous working userlog database. (all XOOPSPREFIX_mod_userlog_* tables)
8- Go to your admin > system > modules > userlog -> update (important: wait until you see the report page. It is better to save this page for future review)
9- Go to system > maintenance > clear all caches
10- Change the default settings to your desired in the module preferences. Do not forget to back the module log status to Active.
11- Do not forget to open your website again.


Please pay more attention especially to this:

- Do not install the most recent version and import the old database backup and try to update it in admin. (Do not do it in any other xoops module too otherwise it will not work correctly after upgrade)
It will not work because Xoops store other information from modules like the module version in some other tables like _modules table and you just import the module tables and not this other information.

Login

Who's Online

80 user(s) are online (47 user(s) are browsing Support Forums)


Members: 0


Guests: 80


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits