Skip to content

WordPress Asking For FTP Credentials When Installing Plugins Or Themes

Most web hosting is configured to automate installing themes or plugins. On some hosting WordPress ask for FTP details either to update or install a theme or Plugin.

To fix this issue we can enter our FTP credentials in the wp-config.php file so that we don’t have to enter it every time we update a plugin.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

It also helps in the new automatic update feature introduced by WordPress.

Enter the following code in the wp-config.php file:

define('FTP_USER', 'username');
define('FTP_PASS', 'password');
define('FTP_HOST', 'ftp.mananpatel.in:21');

Where

  • username is ftp username.
  • password is ftp password.
  • ftp.mananpatel.in is ftp hostname and 21 is port number.

Alternatively, We can also override default file and directory permission by entering following lines in wp-config.php

define( 'FS_CHMOD_FILE', 0644 );
define( 'FS_CHMOD_DIR', 0755 );
Where
  • FS_CHMOD_FILE is file permission &
  • FS_CHMOD_DIR is directory permission.

Happy Coding 😉

(Visited 1 times, 1 visits today)
%d bloggers like this: