If you're asked to enter your FTP credentials when you try to install or update a plugin or theme in the WordPress dashboard, it's because of a specific setting in the wp-config.php file.
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.