If you copy your forum files to a different computer to run Composer, you don't have to copy the database to that second computer, you can just copy all files, run Composer, then re-upload all files, without ever "hosting" the forum on the second computer.
When you copy back config.php
, the forum will automatically reconnect to the existing database, and if you updated Flarum it will open the upgrade page with a button to update the database.
If you update extensions in this manner, the migrations will not automatically run until you disable and re-enable any extension. This can be a problem if the missing database changes prevent the forum from working at all. In this case the best would be to disable the extensions you plan to update before updating the files.
If you have SSH, running php flarum migrate
on the command line is recommended, as it could take a long time if you have a lot of extensions, and when running the upgrade from the web interface your webserver could kill the process and corrupt the database if it takes too long or requires too much memory. But to do this without SSH on the server you would have to copy the database to the second computer as well, run the command, then upload the database back to the webserver. I think if you come to a point where this method is necessary, it's worth investing the time savings into a host that offers SSH.
By assets, I mean every user-generated content that is stored on the filesystem but not in the database. If you copy the entire forum to a different computer then back, the assets will move with it and not be lost. But if you do the upgrade by swapping your forum files with a fresh ZIP download, you will need to copy config.php
, and everything in the public/assets
folder. On a vanilla Flarum this contains the forum logo and user avatars, but extensions can store more data. Some extensions might have stored permanent data in the storage
folder as well, but generally that folder only contains files that are safe to delete so you might not need to preserve that folder. If you have a backup you can always copy files from the backup later if you notice some images don't appear on the forum for example.