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:-
I think it should resolve your problem. If not then it may be permission issue with your wordpress folder.