Ideally when upgrading WordPress or adding plugins, you would just be able to hit a button and it would download and install without issue. Unfortunately, depending on permissions on the server among other things, that may not always happen. When there is an issue, a popup modal will appear and ask for FTP credentials:
Unfortunately WordPress will not remember the credentials you input here, which means every time you download an update or install a plugin, you will need to enter them again and again. Luckily, there is another option. You can store the credentials inside of your wp-config.php file. To do that, open wp-config.php and fine “/* That’s all, stop editing! Happy publishing. */”, right above that, put the following PHP code:
define('FTP_USER', 'user');
define('FTP_PASS', 'password');
define('FTP_HOST', 'localhost');
define('FTP_SSL', false);
You will need to replace user, password, localhost, and potentially false with your own credentials. Once you do, this code will make it so you never see the popup again, which in turn could save you lots of time. It will store the information and as long as nothing changes, you should be good to go from now on.