In some cases and due to modern wordpress plugins/script complexity, it takes longer time to execute scripts while PHP Execution limit in the Hosting Panel is too low which would cause something like:
"Update failed: 504 Gateway Time-out nginx"
Solution:
In order to solve this issue, we need to increase the PHP Execution limit from its default to something higher as following:
- Login to the web hosting panel
- Navigate to Domains > example.com > PHP Settings
- Select or specify max_execution_time in seconds
ex. Default is 30 Seconds, try 120 Seconds. If the issue still appears try to manually enter it to 400 Seconds
- Press the OK button and apply changes