WordPress – I was not able to download any plugin / theme. Solution

I was not able to download any plugin / them, wordpress was still insisting on using FTP, which also did not worked. So after some googling I found working solution

  1. Add define ('FS_METHOD', 'direct'); to config file wp-config.php and
  2. modify file wp-admin/includes/file.php so:
  • find method get_filesystem_method
  • change last line from return apply_filters('filesystem_method', $method, $args); to return $method;

 

For result see image below:

wp_ftp_fix