• Hi,

    I just updated my server to Debian Stretch and PHP 7.0. Prior to the updates, I was able to update my plugins in the admin area. After the update, it’s asking for the FTP connection information to update. My server actually don’t have FTP enabled due to security issues with FTP so I wanted see what needs to be done to have it updating as before.

    If you have any ideas, please let me know. Thanks in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • WordPress asks for your FTP credentials when it can’t access the files directly. This is usually caused by PHP running as the Apache/Nginx user rather than the user that owns wp-content. What are the owner/group and permissions on wp-content?

    Thread Starter racerstodeath

    (@racerstodeath)

    The folder is set correctly for the user with 0755 permissions – don’t think these were changed in the course of the upgrade. How can change how I fix the PHP side? Thanks for helping out.

    I was a bit misleading when I posted earlier; you probably don’t want to change the user that PHP runs under. Instead, you’ll need to verify that the user that owns the Apache/Nginx process has write permissions on wp-content.

    It may work to open up wp-config.php and add define( 'FS_METHOD', 'direct' );, but this is potentially risky if you’re on a shared hosting server (see https://wordpress.stackexchange.com/a/232291 for more details).

    Thread Starter racerstodeath

    (@racerstodeath)

    I tried the FS Method but it’s giving me an error: “An error occurred while updating UpdraftPlus – Backup/Restore: Could not create directory.”

    So I am using Webmin and I went to server – apache webserver – user and groups – Run CGI programs as Unix user #XXXX and group #XXXX.

    I don’t know what those 4 digit number represented so I just changed it to the username for the owner of the directories. Restarted apache but still not working.

    I’ll investigate it more today. Thanks for offering the suggestions!

    Thread Starter racerstodeath

    (@racerstodeath)

    So an update for other that are experiencing similar issues. We were able to narrow it down to PHP 7 using separate instances for each user instead of just 1 for all users. Looking at our back up VM, PHP 5 ran an instance under an Admin user. In PHP 7, there were multiple instances under the user name for each virtual server instance. For each virtual servers running there was 1 PHP instance in the username and 1 for the group. Then there would be 3 instances for www-data.

    It seems the problem is that the file/folder ownership is no longer under the virtual server user’s name but under www-data and with permissions set at 755 per WordPress’s documentation, it wasn’t allowed to write into directory.

    Our solution was to set the permissions for folders to 775 so that www-data can write into directories. Not sure if this is the best way but it works for now.

    Lastly, I did end up using define( ‘FS_METHOD’, ‘direct’ ); in the wp-config file. Not sure if it works without it though.

    Please let me know if there is a better way to fix this problem. I always consider giving more permissions to fix a problem is the lazy way out so further help is appreciated.

    The directory to the config files are located at /etc/php/7.0/fpm/pool.d

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Update Plugin Directly in Admin – No FTP’ is closed to new replies.