When you are prompted for your FTP credentials when trying to install or update a plugin or theme in the WordPress dashboard is due to a setting within wp-config.php. Follow the steps below to prevent WordPress from displaying this FTP prompt.
- Connect to your hosting account with FTP or File Manager.
- Find the folder with your WordPress files and open the wp-config.php file.
- At the bottom of the wp-config.php file, above the line that says
/* That's all, stop editing! Happy publishing. */, add the following lines of code:
define('FS_METHOD', 'direct'); define('FS_CHMOD_DIR',0755); define('FS_CHMOD_FILE',0644);
- Save the updated file.
- In a browser, reload your WordPress dashboard page.
You can now update or install plugins and themes without being asked for FTP credentials.