How to prevent WordPress from asking FTP information when doing updates?

The story :

One of the great features of WordPress is that it allows you to automatically download, install and upgrade plugins or WordPress core files.

A common issue is that WordPress asks for your FTP information when it can’t access the files directly, which results in a page indicating that “To perform the requested action, connection information is required.“.

This is usually caused by PHP running as the apache user (mod_php or CGI) rather than the user that owns your WordPress files.

ftpinfo

How to get rid of that?

Go to your WordPress installation directory and go for editing wp-config.php file.

Then add the following lines at the end of the file :

Save wp-config.php file, and you are done. Happy Updating!