Documentation
Migrate from BoxBilling

Migrate from BoxBilling

Please note that some legacy BoxBilling features, most notably forums have been deprecated in FOSSBilling (as well as in the latest BoxBilling releases). Although forum posts and user information will remain in the database after migration, they will not be displayed in any way in the new installation.

See the changelog (opens in a new tab) for more complete info.

The FOSSBilling project was forked from BoxBilling in 2022. FOSSBilling aims to provide a more stable and secure open source billing platform with a clear roadmap and more transparent governance.

If you are currently using BoxBilling and want to migrate to FOSSBilling then you can, and we aim to make the process as simple and painless as possible.

These instructions assume that you are using the latest version of BoxBilling (4.22.1.5). If you are using an older version then it is highly recommended to update your install before migrating.

Instructions

Before you do anything, make sure that you do a full backup (or two) of both the database and all files in your current BoxBilling installation.

Not doing so will leave you with no way to restore your data if something goes wrong.

Breaking Changes

Please note, FOSSBilling has made significant changes since forking from BoxBilling, custom themes and modules may no longer work. We recommended reading the changelog (opens in a new tab) to review any changes listed as a breaking change. Most notably, we have migrated from twig 2.x to twig 3.x and changed the file names from .phtml to .html.twig.

Download the latest release

Download the latest release of FOSSBilling using this link: Latest Stable Release (opens in a new tab)

Prepare your existing installation

We have slightly changed our theming system. If you are using a custom theme for the client area, you will need to make some changes on it to get it working with FOSSBilling. A guide for that is on the way.

Until then, join our Discord server (opens in a new tab) to get help.

  1. Make a full backup of your database and all of the existing files and folders in your BoxBilling installation.
  2. Remove the 'bb-vendor' and 'bb-themes' folders (create a backup of your theme if you are using a custom theme).
  3. Rename the following folders and files to remove the bb- prefix:
    • bb-data -> data
    • bb-library -> library
    • bb-locale -> locale
    • bb-modules -> modules
    • bb-uploads -> uploads
    • bb-config.php -> config.php
  4. Delete the following files:
    • bb-cron.php (you will need to update your cron job to point to cron.php)
    • bb-di.php
    • bb-load.php
    • rb.php
    • bb-ipn.php
    • bb-update.php
    • You should also delete all files and folders under data/cache

Note: In the process of updating the folder structure, bb-ipn.php has been renamed to ipn.php. If at all possible, you should create a virtual alias from bb-ipn.php to ipn.php on your server. If you cannot do this, you must create a copy of ipn.php and name it bb-ipn.php for old subscriptions to continue to function.

Upload and extract the FOSSBilling files

Upload and extract the contents of the preview build archive over the files in your existing BoxBilling installation and replace any existing files.

Remove the install folder

Delete the 'install' folder and all of the files inside it. Since you already had BoxBilling installed, you will not need to go through the FOSSBilling installer again.

Run foss-update

Run the foss-update.php script. (ex: example.com/foss-update.php)

Migrate the configuration file

You can either do this using either of the following methods:

  • Recommended: Use the automated migration tool.
    1. Edit your config.php file and update the twig->cache key to point to /data/cache instead of /bb-data/cache
    2. Login to the administrator panel, go to Extensions->Overview in the sidebar.
    3. Navigate to the Update FOSSBilling tab
    4. Click the Migrate configuration button to run the automated config migrator.
    • The FOSSBilling interface should provide feedback if the migration went smoothly, but you can verify by opening config.php, you should see new configuration keys that were added. There should also now be a backup of the old config under config.php.old
    • Note: if you are using custom values for locale_date_format or locale_time_format, you will need to manually update these to the datetime format (opens in a new tab).
  • Not Recommended Rename 'config-sample.php' to 'config.php' and then copy the values from your old configuration file (database name, etc.) into the new configuration file.
    • This option is discouraged as it is easier to make a mistake and have issues.