• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Upgrade with CLI


Well-known member
I just upgraded with the CLI as it was timing out with the normal way.

It finished with this:

Running upgrade to 1.2.0 Beta 4, step 3... done.
Running upgrade to 1.2.0, step 1... done.
Rebuilding / importing data...
Upgrade completed successfully!

I'm slightly confused though as I was upgrading from 1.1.4 to 1.2.2. Did it get as far as 1.2.2?

In my ACP it says 1.2.2 at the top...


Well-known member
Also another problem, because I ran the CLI upgrade as the root user, it's not giving me permission to upgrade styles.

An exception occurred: file_put_contents(/home/sites/dev.spurscommunity.co.uk/public_html/internal_data/templates/S.1,L.1,alert_post_tag.php): failed to open stream: Permission denied in /home/sites/dev.spurscommunity.co.uk/public_html/library/XenForo/Template/FileHandler.php on line 95

I assume I need to chown stuff back to being owned by apache?


XenForo developer
Staff member
Those reflect the steps being run. Not all versions have explicit steps. When you started it, it would've confirmed the version that you were upgrading to.


Well-known member
Current version: 1010570
Upgrade target: 1020270 (1.2.2)

I chowned the templates and it got further:

An exception occurred: file_put_contents(/home/sites/dev.spurscommunity.co.uk/public_html/internal_data/templates/S.9,L.0,account.css.php): failed to open stream: Permission denied in /home/sites/dev.spurscommunity.co.uk/public_html/library/XenForo/Template/FileHandler.php on line 95

It's written up to the S.8 files but I'm not sure why it's not writing the S.9 files.


XenForo developer
Staff member
Probably worth chmodding them to 0777. Alternatively, just turn off template files, delete the files and then turn the option back on.

The problem is that when via CLI, you're running as a different user so our attempt to be smart with chmodding fails (and it also creates them as the wrong user compared to normal execution, as noted).

You can also workaround this by explicitly specifying chmod values in config.php.