How to Increase PHP time limit in ngix server?

Server Provider: Ramnode
Server Type: VPS

Installed Wordpress using Easyengine. Tried working on it for 2 days. After 2 days when I logged in got a sql database error saying db not found. After rebooting the server got 504 Gateway time out error. When searching on google got to know its PHP timeout execution should be increased.

When trying to run the ngix PHP limit increasing command it gives me this

What to do?

php settings are not set via Nginx. open the file

/etc/php/7.0/fpm/php.ini

or

/etc/php/5.6/fpm/php.ini