WordPress plugins it asks for FTP Details

While I am trying to upgrade the wordpress plugins it Asks for FTP Details.

I have added the following to wp-config.php

Read More
 define('FTP_USER', 'username');

 define('FTP_PASS', 'password');

 define('FTP_HOST', 'host address');

It has worked fine.
But I have multiple websites working on my virtualmin server. All the wordpress site is having the same wordpress plugin issue. So is there any other fix that could resolve the Issue?

Related posts

Leave a Reply

4 comments

  1. I just found these: link 1 and link 2, where I dug out this:

    WordPress asks for your FTP credentials when it can’t access the files directly. This is usually caused by PHP running as the apache user (mod_php or CGI) rather than the user that owns your WordPress files (suPHP or FastCGI). Switching over to using suPHP or FastCGI would probably fix it. Of course, if you don’t want to mess with that, you can always just put your FTP credentials directly in wp-config.php or use this in the shell:

     pae$ cd /var/ww
     pae$ sudo chown -R www-data:www-data wordpress
    
  2. The best way to deal with wordpress installation on apache is to use the secondary user and group to apache which would not cause these issue while updating or installing plugins and using other wordpress functions.
    just change your apache config file User and Group to your username and group name
    User [yourusername]
    Group [yourgroupname]

  3. Are you hosting your WordPress sites on one of those hosts where WordPress asks you to provide FTP details before upgrading itself or upgrading plugins?
    So Now WordPress will stop asking you for FTP details Here’s how you can do it
    Open your wp-config.php file locate in your wordpress root directory
    And copy and past below detail after your database detail block in wp-config.php file

    define(“FTP_HOST”, “ftp.yourhost.com”);
    define(“FTP_USER”, “ftpusername”);                                           
    define(“FTP_PASS”, “ftppassword”);