different server port (7 posts)

  1. donkrug
    Posted 5 years ago #

    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.

  2. 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');


  3. donkrug
    Posted 5 years ago #

    I will give it a try and let you know. thanks.

  4. donkrug
    Posted 5 years ago #

    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.

  5. Add in define('FTP_SSL', true); maybe?

  6. donkrug
    Posted 5 years ago #

    It seems that this enables ftps (ssl) but I am using sftp which I think is a different algorithm?

  7. They are different, though sometimes SFTP 'works' with FTPS (SSL).

    Can't hurt to try :)

Topic Closed

This topic has been closed to new replies.

About this Topic