I have installed Wordpress 4.4 on my own CentOS 7.2 server, and then installed a theme by extracting it to the wordpress theme folder and activating it from them admin part.

That is working fine, but now I want to install a few plugins, which I have as .zip files. So I go to the Add plugins page (the one which says "If you have a plugin in a .zip format, you may install it by uploading it here.") and then I upload the .zip file (mt_testimonials.zip) but instead of installing the plugin, it redirect me to a ftp upload page, where I can input my ftp credentials. Anyone who got a clue why?

  • Looks like you have permissions issues. Make sure your folders and files have the correct permissions and that you don't have any plugins overwriting permissions. Security plugins can break some of that functionality. Codex -> codex.wordpress.org/Changing_File_Permissions – gdaniel Dec 21 '15 at 21:27
  • It's a standard 4.4 wordpress install, with no plugins installed except for the theme. And just for testing i did a chmod -R 777 on the wordpress directory so now there is write access to anything. But still same issue – MTilsted Dec 21 '15 at 21:31
  • Are your user and user groups the same when you look at the file permissions? – gdaniel Dec 21 '15 at 21:35
  • They are now, but that don't change anything. – MTilsted Dec 21 '15 at 21:38

Unzipping and installing plugins requires filesystem manipulation. That is difficult to make portable across all systems/configurations. Performing those manipulations via FTP is one the more reliable ways to do it, and quite probably one of the more secure especially if the server runs a reasonably secure sFTP server. I am pretty sure that is the "why".

  • sftp??? Why does wordpress ask for ftp, it it supports sftp? – MTilsted Dec 21 '15 at 21:42
  • 1
    FTPS, sorry, but it is similar. Some plugins provide sFTP capability. Either way, it is better than some other options. – s_ha_dum Dec 21 '15 at 21:50

Ok, I solved it. I changed the owner of the directory to daemon which is the same user which the apache server run as. And now it's working. Which I still find odd, because with a chmod 777 -R mysite.com that should not matter.

  • 777 is very dangerous. – s_ha_dum Dec 21 '15 at 21:42
  • I know: I only did it to test if it was a permission issue. (It was, but oddly enough, chmod -R 777 was not enough). I have done a reinstall now with normal permissions now. – MTilsted Dec 21 '15 at 21:49
  • I have let php handle permissions in the past. Most people will say that's slower, and they are correct, but if you are not building huge massive sites, than that's no really an issue. – gdaniel Dec 21 '15 at 21:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.