WordPress : Asking FTP credentials when trying to install a plugin or theme WordPress : Asking FTP credentials when trying to install a plugin or theme wordpress wordpress

WordPress : Asking FTP credentials when trying to install a plugin or theme


Follow the below steps.

  1. Open wp-config.php

  2. Edit the file.

  3. Add the following given line after WP_DEBUG

    define('FS_METHOD', 'direct');

  4. Save


Since the files are not getting access you are prompted with FTP credentials.

There are 2 options to follow :

  1. Provide the FTP credentials inside /wp-config.php file :

define( 'FTP_USER', 'username' );
define( 'FTP_PASS', 'password' );
define( 'FTP_HOST', 'ftp.example.com:21' );

  1. By Pass the check as show in the SO post :

Can I install/update WordPress plugins without providing FTP access?


The easiest way to solve this problem is add the following code in your wp-config.php

define('FS_METHOD', 'direct');

If still problem exists, follow the steps given by following link :

https://www.narga.net/stop-fix-wordpress-ask-for-ftp-credentials-upgrade-install-delete-themes-plugins/