Sounds like production server needs file system repository.
Please see:
https://docs.moodle.org/29/en/File_system_repository
The directory created for the file system respository is outside of moodle's 'normal' file system - ie, the filedir in moodledata. One uses whatever tool one can (ftp/scp/WinSCP, etc.) to access the server and the directory created for the file system repository.
Such a setup isn't restricted by PHP nor by Moodle ... it might, however, be restricted by the operating system upon which Moodle runs by the provider of the service.
A large course still might require some tweaking of other settings on server ... MySQL as well as PHP. MySQL might need max_packets_allowed set higher. PHP might need time for a script to run set higher.
So if your first attempt to restore fails, turn on debugging and then try it again. Debugging will hopefully give you a clue as to what is needed. Might also have to check your apache error logs.
'spirit of sharing', Ken