Failed to upload wordpress theme


failed to upload wordpress theme .
getting below mentioned error :

Failed to connect to FTP Server localhost:21

third party theme want to upload -


Use this code in your wp-config file:-

define(‘FS_METHOD’, ‘direct’);

I think it should resolve your problem. If not then it may be permission issue with your wordpress folder.