I have a different port to access my server when using sftp. Is there a way to modify the config.php file or anonther file to be able to use the connection function. Currently the default is port 21. I assume there is a place that this can be changed.
thanks.
Possibly. In http://codex.wordpress.org/Editing_wp-config.php it mentions this:
define('FTP_HOST', 'ftp.example.org');
In THEORY you can add that line to your wp-config and define a port, but I don't know if that would actually work.
define('FTP_HOST', 'ftp.example.org:22');
Maybe?
I will give it a try and let you know. thanks.
Okay I tried a number of combination's. The other issue seems to be that I use sftp and it only allows ftp. the code you provided di allow me to change the port. so one step forward.
Add in define('FTP_SSL', true); maybe?
It seems that this enables ftps (ssl) but I am using sftp which I think is a different algorithm?
They are different, though sometimes SFTP 'works' with FTPS (SSL).
Can't hurt to try :)