When working on WordPress websites locally the common problem we had is not being able to install plugins from within the plugin backend page. When you try to install a plugin you’re asked to enter FTP credentials to proceed (the ‘FTP connection details’ fields). To resolve this issue; we can simply add the following code to the wp-config.php to let WordPress use a different filesystem method than FTP.

This setting also allow you to update WordPress Core and install themes from the theme repository locally.