Connection Information Wordpress

October 27, 2014 2k 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/
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.
Have another answer? Share your knowledge.