I’m upgrading multisite to 3.5.1 and it did not allow me to do automatic upgrading I see this message:
“To perform the requested action, WordPress needs to access your web
server. Please enter your FTP credentials to proceed. If you do not
remember your credentials, you should contact your web host.”
So I add the FTP credentials in wp-config.php
but still does not work. I investigate and found out that WordPress core files are owned by the root and not by my ssh username. Example of these files are the files in the wp-includes
and wp-admin
.
Is there a way to perform automatic upgrade of WordPress multisite without having a root access?
You need to…
… have your files and folders owned by your user. If you have
sudo
privies with your SSH access this should be easy to accomplish.… have your files and folders, at least the ones in
wp-content
, in the same group as the web server. Otherwise you will have trouble with media uploads. Again, not hard.… have your file permissions correct, so that the user and the group can read and write, and everyone else can just read. Directories need execute permission also or you can’t read from them even if the file permissions are correct inside the directories.
Now the caveats.
sudo
privies, you will have to ask you host for help.If your FTP user is different from your SSH user you can still get this to work by adding the FTP user to the webserver’s group.
I believe that some flavors of Linux have slightly different names for this command. You may need to look this up for the specific command for your flavor.
The permissions used above are pretty open. You can make them tighter. See the Codex on File Permissions and on Hardening File Permissions. I would get things working with the relatively loose permissions and then tighten things up. Pay special attention to the fact that some files and directories can have must tighter permissions than others.
You can have trouble with PHP’s
safe_mode
as here: WP upgrade can’t create directory even though perms are 777I think that should be it, though server configuration can be tricky and I may have forgotten something. I don’t have to configure servers all that often so it is possible that something has slipped my mind. I would suggest looking up every step and understanding exactly what is going on before you do anything. Backups, of course, are always encouraged.