Relative Content

Tag Archive for phpwordpressnginx

Environment variable in Niginx or using phpdotenv

I am trying to save api authorization key (sensitive information) in an environment variable. I used fastcgi_param inside location ~ .php$ in Nginx configuration. I am calling this variable inside function.php file in wordpress to use the api. Is this secure or should i use phpdotenv php package and create .env file to define the variable. Thanks

504 Gateway Timeouts

Our Nginx server with WordPress 6.5.5 and PHP 8.2 is randomly encountering 504 errors, resource spikes and crashing. While using a response time monitor, I have seen long periods of time in the 0ms range and suddenly, this has increased even higher. (Above 700ms) Regarding the following response time data image, is there anything noticeable from this behavior that I’m missing? Is it normal for response times to bounce between 858ms and 1310ms? Any insight is appreciated. (All theme/plugins are up to date and have increased PHP max_execution_time and other theme requirements.) Thank you.