Hello,
Could you, please, contact your hosting provider and ask what errors do you have in the server error logs. If you get 504 then some errors should be in the server error logs that would help to find out what is the reason on the issue.
So, provide these logs + WP Dashboard access + FTP access.
Regards