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.
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');
- 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 );
- FS_CHMOD_FILE is file permission &
- FS_CHMOD_DIR is directory permission.
Happy Coding 😉