Wordpress FTP Permissions Error

Discussion in 'Installation/Configuration' started by Dave B, Jan 31, 2021.

  1. Dave B

    Dave B Member HowtoForge Supporter

    Evening all,
    I am trying to set up my WordPress installation to automatically update as and when required.
    So I have added my FTP account details to the WP_Config.php and then tried to update.
    When I do this I get the below error but when I log in with the FTP account and create directories it works fine, Any ideas on how to resolve it?

    Code:
    define( 'FS_METHOD', 'ftpext' );
    define( 'FTP_BASE', '/var/www/clients/client1/web1/web' );
    define( 'FTP_CONTENT_DIR', '/var/www/clients/client1/web1/web/wp-content' );
    define( 'FTP_PLUGIN_DIR ', '/var/www/clients/client1/web1/web/wp-content/plugins' );
    define( 'FTP_PUBKEY', '/etc/ssh/ssh_host_rsa_key.pub' );
    define( 'FTP_PRIKEY', '/etc/ssh/ssh_host_rsa_key' );
    define( 'FTP_USER', '**********' );
    define( 'FTP_PASS', '**********' );
    define( 'FTP_HOST', 'localhost' );
    define( 'FTP_SSL', true );
    upload_2021-1-31_0-3-46.png
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Why use FTP instead of local editting? Check the permissions and ownership of the folders and files in the web folder, make sure they are owned by the correct user and group.
     
  3. Dave B

    Dave B Member HowtoForge Supporter

    Hey Th0m,
    Not sure what you mean by "Why use FTP instead of local editting?" it seems on Wordpress to use the auto update features you need to configure FTP access settings.
    But yeah the ownership of the folders is correct.

    upload_2021-1-31_11-41-27.png

    upload_2021-1-31_11-40-21.png

    upload_2021-1-31_11-40-57.png
     
    Last edited: Jan 31, 2021
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Can you look in the wp-content folder to see the permissions?

    Over here automatic updating works fine, without FTP configured.
     
  5. Dave B

    Dave B Member HowtoForge Supporter

    Sure, I've included the snapshot below.
    If I comment out the below script in WP-Config.php and then try an update I am prompted to enter the details for my FTP account which when I do and click on proceed the updates work fine, So maybe an issue with the script below? (Already tried commenting out the PUBKey and Prikey along with the SSL)

    Code:
    define( 'FS_METHOD', 'ftpext' );
    define( 'FTP_BASE', '/var/www/clients/client1/web1/web' );
    define( 'FTP_CONTENT_DIR', '/var/www/clients/client1/web1/web/wp-content' );
    define( 'FTP_PLUGIN_DIR ', '/var/www/clients/client1/web1/web/wp-content/plugins' );
    define( 'FTP_PUBKEY', '/etc/ssh/ssh_host_rsa_key.pub' );
    define( 'FTP_PRIKEY', '/etc/ssh/ssh_host_rsa_key' );
    define( 'FTP_USER', '**********' );
    define( 'FTP_PASS', '**********' );
    define( 'FTP_HOST', 'localhost' );
    define( 'FTP_SSL', true );
    
    upload_2021-1-31_14-11-0.png
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    It is not necessary for WordPress installations on an ISPConfig system to set FTP update. Just take care that you use the right PHP mode (PHP-FPM or PHP-FCGI) and that the suexec checkbox is ticked in the website settings. And take care to remove the FTP configuration from wp-config file.
     
    Dave B likes this.
  7. Dave B

    Dave B Member HowtoForge Supporter

    Thanks Till, That now works perfectly.
     
    till likes this.

Share This Page