Update Theme or Plugin Failed FTP Connection Required
If your site has restricted access to PHP routines for file reading and writing and only allows it by FTP or other method, this might conflict with the theme or plugin updates.
There are some definitions, provided from WordPress that can be added to the wp-config.php to bypass the FTP connection.
For these steps you should use an FTP software to access your server files:
- Open wp-config.php located in the site root folder
- Find the line
if ( !defined('ABSPATH') )
- Before this line, paste this snippet:
define( 'FS_METHOD', 'ftpext' );
define( 'FTP_SSL', false );
define( 'FTP_BASE', '/your-wordpress-root/' );
define( 'FTP_CONTENT_DIR', '/your-wordpress-root/wp-content/' );
define( 'FTP_PLUGIN_DIR', '/your-wordpress-root/wp-content/plugins/' );
define( 'FTP_USER', 'ftp_username' );
define( 'FTP_PASS', 'ftp_password' );
define( 'FTP_HOST', 'ftp.yourdomain.com' ); - Replace
'/your-wordpress-root/'with the server path to your WordPress installation. Typically, you might have installed WordPress in your root folder. so you would usedefine( 'FTP_BASE', '/' );
define( 'FTP_CONTENT_DIR', '/wp-content/' );
define( 'FTP_PLUGIN_DIR', '/wp-content/plugins/' ); - Replace ftp_username, ftp_password and ftp.yourdomain.com with the correct definitions. You should have got these from your hosting provider.
- Once you've filled-in all the info. Save the wp-config.php file.
It's ready now, so next time you try to upgrade, you won't have to enter the credentials.