Xenforo on high traffic production sites - release management.

We have recently been going through the process of setting up XF for a fairly busy forum that is run as a business and employs multiple full time people.

It is tied in with a complex classifieds system and various other applications that all talk to it.

We are gobsmacked that there seems to be no easy way of putting Xenforo into GIT and using a proper release management system.

By that I mean on a normal production app to make an upgrade / change to the code you would:

- check out the develop branch from your repo
- maybe branch it to a feature branch depending on what you are doing
- make your changes, add any extra files, write any necessary database migrations.
- 'deploy' that code to a staging servers and check it all works ok.
- finally merge the code into the master branch.
- the deploy that code to the production servers and run any necessary database migrations.

On XF the process seems to be:

- checkout the code from the repo
- download the latest production database and install that
- install whatever addon you are using / make whatever changes
- run various installation scripts and make a bunch of changes stored in the db (carefully noting what you do).
- make a load of template edits that are stored in the database. Have no history that you would normally get with GIT.
- check it all works and commit the code changes.
- deploy the code to staging server
- re run all the installation tasks
- copy and paste all your template edits
- cross your fingers you haven't forgotten anything
- finally repeat the same thing on production, hoping that no one notices whilst you are setting stuff up on a live site.

For anyone who is used to a proper release management system, this cycle is just plain crazy especially if you have a heavily modified site.

There must be a better way of doing it, and I cannot believe that all the big sites running Xenforo are doing it this crazy way. The big sites must have built a better way of handling it and just aren't sharing but anyway...

We are thinking of writing some sort of tool that

a) lets you store all the templates in the filesystem and then syncs them with the database (allowing you to store the templates in GIT and easily revert / see history).

b) Some sort of database migration system that lets you deploy an addon to production without having to go through the rigmarole of actually installing and configuring said addon on production.

Has anyone else ever done something similar?


Well-known member
I've taken to using addons to deploy template modifications, because otherwise the template edits are a pain-in-the-ass to handle.


Well-known member
Template edits can be deployed from "test" to "production" in mere nanoseconds if its the default theme for the board. Having the test theme as an unselectable theme on the production board and then swapped to as the default, set as selectable will have it deployed quickly. Alternate themes this doesn't really work for as you pretty much have to import and over write unless you want to use SQL to change all those who have it selected, to the next deployment versions id number.