Wordpress Requesting FTP Details

WordPress asks for your FTP credentials when it can't access the files directly. This happens when PHP running as the different user (mod_php or CGI) rather than the user that owns your WordPress files.

Advert

WordPress asks for your FTP credentials when it can't access the files directly. This happens when PHP running as the different user (mod_php or CGI) rather than the user that owns your WordPress files. In my case it was when I tried to use WP over nginx. Switching over to using suPHP or FastCGI would probably fix it.

If you don't want to work around there you can fix it in 3 ways :

  • Provide the FTP details every time it asks for.
  • Define your FTP credentials directly in wp-config.php.
    
    define( 'FTP_USER', 'username' );
    define( 'FTP_PASS', 'password' );
    define( 'FTP_HOST', 'ftp.yourdomain.com:21' );
    
  • Change the directory ownership. Navigate to your wordpress root directory and change ownership to www-data
    
    sudo chown -R www-data:www-data <wordpress-directory>
    

Comments

Wow ! you have someting to tell us. That's great! Please keep in mind that comments are moderated, we employ rel="nofollow" for links, avoid using a spammy word or a domain in name field, it might end up as a Spam. Thanks for reading.

Last 5 Articles

All Articles >

  1. How to Remove an App from Django Project

     
  2. Parse Time HH:mm:ss without date in javascript

     
  3. Software Testing

     
  4. Best WordPress Themes For Photographers And Photography

     
  5. Problems That Affect Conversion Rates

     

News Letter

Subscribe to our email newsletter for useful tips and valuable resources, sent out every new article release.