Fix WordPress asking for FTP details when Installing or Updating

Must Read : Fix WordPress asking for FTP details when Installing or Updating

Most Web hosting are configured to automate installing of theme 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 wp-config.php file so that we don’t have to enter it  every time we update a plugin.

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

Enter following code in wp-config.php file.

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

Where

  • username is ftp username.
  • password is ftp password.
  • ftp.website.com 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.
(Visited 47 times, 1 visits today)

Leave a Comment.