Set the perfect permissions for WordPress:
cd /path/to/wp/webroot; find . -type d -print0|xargs -0 chmod 755; find . -type f -print0|xargs -0 chmod 644; chown nginx:nginx * -R
*Update nginx:nginx to your web daemon user and group
Set the perfect permissions for WordPress:
cd /path/to/wp/webroot; find . -type d -print0|xargs -0 chmod 755; find . -type f -print0|xargs -0 chmod 644; chown nginx:nginx * -R
*Update nginx:nginx to your web daemon user and group
Recently had an issue where I was unable to upload media within WordPress. Turned out the user and group in php-fpm’s www.conf was incorrect. To fix:
vim /etc/php-fpm.d/www.conf user: nginx group: nginx
Restart php-fpm
service php-fpm restart
1. Check the nginx stub_status_module is enabled:
nginx -V 2>&1 | grep -o with-http_stub_status_module
This should result in:
with-http_stub_status_module
If not, install nginx with stub_status_module enabled.
2. Add the following code to the server block:
server { listen 80 default_server; # Define the document root of the server e.g /var/www/html root /var/www/html; location /nginx_status { # Enable Nginx stats stub_status on; # Only allow access from your IP e.g 1.1.1.1 or localhost # allow 127.0.0.1; allow 1.1.1.1 # Other request should be denied deny all; }
*Set allow IP to the sources you need access from*
3. Browse to http(s)://example.com/nginx_status
Credit goes to – https://www.keycdn.com/support/nginx-status/
Recent Comments