The problem with installing/upgrading locally and then uploading to the server is that no platform requirements are checked. The best way to trace this issue is looking for the cause of the 500 error, which can be done by looking at storage/logs/flarum.log first and, if it does not contain any error messages, at the website error log generated by the web server.