feel free to keep it strictly simple...

Upgrade WB

Necessary Preparations

  • Upgrading is only possible from versions 2.7, 2.8.0, 2.8.1 and 2.8.2 of Website Baker, so check whether your version does match this list
  • Make first experiences with LEPTON on a local test installation. Install all addons you use on your site on the test installation and check whether they work smoothly with LEPTON. If not, check for new versions with the author of the addon. Check whether your server meets the minimum LEPTON requirements listed in the installation article
  • Backup all WB files (the script is still in beta state!)
  • Backup the entire database with the WB tables (the script is still in beta state!)
  • Under the root directory of the WB installation you want to upgrade, create a subdirectory named WB2L
  • Upload the entire content of the upload directory of the LEPTON 1.1.0 into the WB2L subdirectory
  • It is highly recommended to protect the WB2L subdirectory by a .htaccess file against unauthorized access, if possible
  • Upload all files contained in the upload script into the WB2L subdirectory
  • Make sure all files and directories are writable by the account under which scripts run (this might be a different account from your ftp account on some servers)
  • LEPTON tables in the DB are required to have another prefix than the existing WB prefix, so choose a prefix which does not already exist (in the next step, the prefix is xyz)

 

Run the Upgrade script

The url of the WB installation to upgrade should be http://your.wb.installation.tld Than run the upgrade script as follows:

http://your.wb.installation.tld/WB2L/upgradeWB.php?newdbprefix=xyz

The script will stop as soon as it experiences an unexpected error. It will tell why it stopped, so you can solve the problem reported and restart the script afterwards. There are no problems calling the script several times, because it will remember (and skip) the important steps which are already finished. If you have a larger site and / or a small timeout configured for scripts on your server, it might be necessary to start the script 3 or more times until it finishs.

What does the script do?

  • Check whether it is run from the WB2L subdirectory of a WB installation
  • Create a temporary config file for itself
  • Create the rollback table WB2L
  • Create temporary start page "This site is temporarily not available"
  • Move all WB files to the subdirectory WB2L_BACKUP
  • Move LEPTON files to the root directory
  • Write the LEPTON config file
  • Create LEPTON DB tables
  • (Re)Install all addons
  • Copy content from WB tables into LEPTON tables
  • Check whether the default WB language is installed, otherwise change it to EN(glish)
  • Check whether the default WB Frontend template is installed, otherwise change it to the lepton template
  • Check whether the default WB Backend theme is installed, otherwise change it to the Algos theme
  • Check whether there are sections of the module code, if yes, change them to code2 sections
  • Replace the temporary start page by the LEPTON start page

Known problems and their workarounds

  • If you have replaced the core module wysiwyg by the module wysiwyg history, you will loose the history when upgrading. The workaround is to replace the LEPTON module wysiwyg by the module wysiwyg history in the WB2L/modules directory before starting the upgrade process
  • The script stops when dbWatchSite is installed. The workaround is to patch the file class.config.php of the module. In the constructor, change the parameter from false to true, so the line should look as follows:
   public function __construct($createTables = true) {
  • After upgrading from news 2.8, the long versions of existing articles will be no longer visible. As a workaround, commment out line 329 of modules/news/view.php as follows:
 //  if(defined('POST_SECTION') AND POST_SECTION == $section_id)

Necessary Post-processing

After the upgrade, it is highly recommended to check whether all pages work as expected.

  • If they do so, call the cleanupWB script to finally delete WB tables and files. The script will tell you which files you have to delete manually as the last step (a php script cannot delete itself and files it included).
  • If there are problems you can not solve in a timely manner, run the rollback2WB script to roll the upgrade back to WB. Than you have time to solve the problems, while your site is up and running, until you are prepared to redo the upgrade. The rollback script should not be used after new pages are added or after new addons are installed, this would result in a mess!

Links