Hi I have setup many Joomla sites without any issues with ISPconfig (nginx), and today I am migrating my wordpress site to IPSconfig server using root account, then change all folder and files user and group owner. they all look correct to me, but somehow wordpress health tool still shows: WordPress directory Not writable ANYONE KNOWS WHY?
Might be that you accidentally changed the owner of the 'web' directory itself. Try changing it to the web user and client group of the site.
initially it all looks ok.. possibly some unshown files or folders have the wrong permissions.. from the webroot, you can run: Code: find . -type f -exec chmod 644 {} \; find . -type d -exec chmod 755 {} \; that should make sure every file and folder has the correct permissions.. those work fine for me with apache, i don't see any reason nginx would want different.. maybe set wp-config.php itself to 640. otherwise possibly something in the vhost configuration blocking access? i would say possibly something in .htaccess, but that won't apply to nginx. only other thing i can think of is if FS_METHOD is incorrectly defined in wp-config.php
thanks for the replies. tried all below and still getting not writable errors for all folder and files. 1. FS_METHOD defined in wp-config.php 2. web folder permisson is correct 3. already run these commands, also tried wp-config.php as 640 4. nginx Directives in ISPconfig
To avoid these complications, create shell user for that website and use that to copy and install the files there.
Did you alter the attributes of the files, that may prevent writing. You have not shown what is owner, group owner and permissions of the web/ directory itself.
hmm.. don't see anything obviously wrong there. file/folder owner/permissions all look ok. FS_METHOD can be removed from wp-config.php, i believe it uses direct by default. i know on apache i've never needed to actually bother defining it, but having it there shouldn't be a problem anyway. only thing i can think of is one or both of those two 'deny all' settings in the vhost is causing problems.. i have almost no experience of nginx configuration, so i can't say if they're ok or not.
after unzip the migration file, all folders and files are with root / root user and group. a shell user for that website can not change them.
that's because you're unzipping them as root.. if you upload the zip / tar file as the shell user and then unpack it as the shell user, the extracted files should have the correct user/group ownership.
Please post the content of the nginx directives field as text. Using the wrong directives is causing permission errors in WordPress.
I missed that thumbnails. Looking at the nginx directives in the fourth thumbnail, deny all may be the culprit and setting php 8.1 there may not be right either.
That's indeed the cause of the issue, this setting enforces PHP to be run as the wrong user www-data by letting nginx connect to the wrong PHP socket.
thanks everyone helpful tips. Finally found out the root cause of the permission issue. It has nothing to do setting files and folder permission. As Till said it is caused by the wrong setting in "nginx Directives" of ISPconfig. I nerver thought of that place for permission error. After remove everything in "nginx Directives" of ISPconfig and only include below, the permission error gone in wordpress now. Thank you so much.
I hope you mean you keep this following code in it because it is needed for wordpress in nginx to work well. Code: location / { try_files $uri $uri/ $uri.php /index.php?q=$uri&$args; }
Yes, the below codes needed for wordpress to work. location / { try_files $uri $uri/ /index.php?q=$uri&$args; }