Overview


Each HostBill is shipped with Auto-Upgrade, the enabled by default plugin that is built to make upgrades & patches easier and faster. Plugin is located under Extras → Auto-Upgrade. If it's not enabled you can turn it on under Extras → Plugins in your HostBill admin area.

Before using Auto-Upgrade for the first time


Before using upgrade or patch for a first time, make sure you've created backup of both of your HostBill files and database. Use control panel backup option or manual db dump (mysqldump, phpmyadmin or simmiliar). This plugin do not perform backup on its own.

  • Make sure your PHP memory_limit is high (for PHP5.3 128MB is minimum), and your current server load is low.
    • When using Apache your memory can also be limited by its configuration - check httpd.conf for RLimitMEM directive
  • Make sure chmod, mkdir, copy are not in disable_functions in php.ini
  • Make sure that your current HostBill files have valid file owner/group:
    • If you're using suPHP your files should belong to your user, not root
    • If using suPHP please make sure umask is set to 0022 in suphp.conf
    • If using PHP as apache module, your files should belong to apache:apache (user:group)
  • Make sure that http://YOUR_HOSTBILL_URL/install/ can be accessed from HostBill server
  • You need to have active access to updates with your license, otherwise you will get unzip error
  • Auto-upgrade plugin will not work on DSO PHP handler (you will receive archive extract error). Use suPHP if possible

Preventing custom files from being overwritten


Since HostBill 3.9.9 Auto-Upgrade plugin can prevent your custom files from being overwritten. If you've modified any order pages, or use custom version of HostBill module it's still possible to enjoy rapid upgrades, with no need to worry about overwriting your customizations.

To prevent files from being overwritten under List of files/folders to exclude provide list of files/directories you wish to prevent from being overwritten by upgrade, one entry per line, so entry like:

  templates/orderpages/*
  includes/core/class.events.php
  • templates/orderpages/* will prevent plugin from overwriting anything in your templates/orderpages folder
  • includes/core/class.events.php will make sure that mentioned file wont be overwritten

To enjoy latest stable version make sure you overwrite your core files, and your rules do not exclude them

Using Auto-Upgrade


When new version is available you will see notification on the top of the admin home page:

You can perform hostbill upgrade from admin area and command line interface.

Upgrading from admin area

After going to Extras → Auto-Upgrade you will be able to apply upgrade with one mouse click.

Using command line interface

Execute cli.php autoupgrade from your installation admin directory. for example:

$> php /home/hostbill/public_html/admin/cli.php autoupgrade update

Available commands:

  • help - Display help for a command 
  • list - List available commands 
  • update - Update hostbill to latest version
  • version - Display information about current and latest version.
  • plugin:list - List plugins that can be updated
  • plugin:update - Perform module update, you can enter a list of modules to update ot use --all option to update all plugins.

When updating HostBill will:

  • Download latest version
  • Extract it to separate folder
  • Overwrite core files
  • Perform database upgrade
  • Perform files cleanup

Auto-Update in action




FAQ / Troubleshooting


Q: Do I need to download anything?

A: No, this tool will download, extract & apply patch/upgrade automatically.


Q: Will auto-upgrade overwrite my custom client area template?

A: No, as long as you keep your custom templates in separate folder under /templates, if you've modified some files it's safe to make custom folder under /templates and keep your entire look there.


Q: I'm seeing Update in progress... and nothing else.

A: You most likely are using outdated HostBill version with older auto-update plugin, which needs to be updated first, in order for it to update HostBill. To fix that:

  • Proceed to https://clients.hostbillapp.com/ 
  • Download latest HostBill zip file from Download section
  • Unzip zip file contents
  • Take entire includes/modules/Other/autoupgrade directory, and use its contents replace corresponding files on your HostBill server (upload those files there)
  • Re-run autoupgrade


Q: I'm seeing error: Your ioncube loaders are too old, please upgrade them first to version 10.1 or higher.

A: You need to update your ioncube loaders to latest version - Learn more


Q: I'm seeing error: Your HostBill is unable to connect to itself over port 80/443 - you probably have some firewall set-up. Please whitelist your HostBill IP on its own firewall
Q2:
I'm getting error: Upgrade failed, unable to perform database upgrade, please visit ...

A: To finish upgrade process auto-update will need to connect to your HostBill over its domain name, if its unable to do so such error will be shown. Possible reasons:

  • Your HostBill cannot resolve its own IP address (you may need to update /etc/resolv.conf file)
  • Some firewalls may block such traffic (its often referred to as "traffic U-turn")
  • You are still just testing HostBill and disabled IP access to your install. You also need to whitelist your server IP

Q: I'm getting error: Error downloading latest HostBill version archive

A: This error is most likely caused by not being able to connect to our licensing portal https://clients.hostbillapp.com/ over port 443/80.
You may want to try ticking "Force http" in Settings → Modues → Plugins → Auto-update, as your server may be unable to verify our server certificate. If it's not the case, please check your firewall if our sever is not blocked there.


Q: I'm getting error: Error when copying file ...

A: This error is often caused by wrong permissions of all files under your HostBill main directory. To solve that refer to chown -R command, to change ownership of all files/dir to proper user/group.