I followed Failed to connect to FTP Server 127.0.0.1/:21
And was able to solve that problem. But now when I try to upload the theme then I get username and password failure.
I have added following lines in wp-config.php
define( 'FS_METHOD', 'ftpext' );
define( 'FTP_BASE', '/var/www/wordpress/' );
define( 'FTP_CONTENT_DIR', '/var/www/wordpress/wp-content/' );
define( 'FTP_PLUGIN_DIR ', '/var/www/wordpress/wp-content/plugins/' );
define( 'FTP_USER', 'username' );
define( 'FTP_PASS', 'password' );
define( 'FTP_HOST', 'localhost' );
define( 'FTP_SSL', false );
How I can resolve this problem?
UPDATE:
I tried this link and removed all values for ftp which are in wp-config.php
But still same error.
3 Answers
if you do not want to (or you cannot) change permissions on wp-content so your web server has write permissions, then add this to your wp-config.php file:
define('FS_METHOD', 'direct');