Connection Information Wordpress

Posted October 27, 2014 8.9k views


Now every time i try to install a plugin i get to this Connection Information pages on wordpress butt i cannot seems to get past that pages i end up whit this error: Failed to connect to FTP Server

What should i do? And i dont have a ftp server on my server i use SSH and when i connect whit ftp i use the SFTP.

  • Adding these line to your wp-config.php file will solve your ftp connection problem.

    define('FS_CHMOD_FILE', 0755);
    define('FS_CHMOD_DIR', 0755);
    define('FS_METHOD', 'ftpext');
    define('FTP_BASE', '');
    define('FTP_CONTENT_DIR', '/wp-content/');
    define('FTP_PLUGIN_DIR ', '/wp-content/plugins/');
    define('FTP_USER', 'ftpusername');
    define('FTP_PASS', 'ftpuserpass');
    define('FTP_HOST', '');
    define('FTP_SSL', false);
  • I suggest changing the ownership of the WordPress files:

    chown -R www-data:www-data /var/www/

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

This tutorial addresses a lot of the permission issues that occur when trying to make changes or upload a file to wordpress:

by Justin Ellingwood
WordPress is the most popular content management system (CMS) on the web currently. While WordPress can be a great way to manage you content, there are some very insecure configurations that are given throughout the internet. This article will cover how to set up secure updates and installations using SSH keys instead of FTP, which is an inherently insecure protocol.