• Hi Cory,

    Long time fan, first time commenter.

    I’ve been trying to use Duplicator to transfer a site to Media Temple Managed WP hosting. Connecting to the database was failing, and their support suggested it is because they use port 3312.

    When I navigate to /installer.php and enter a port option in the database hostname (e.g. path.to.db.host:3312), I get a connection error.

    Browsing through the installer.php file, it looks like you are checking for an alternate db port on lines 157/158. But the only way I can get it to connect to the db is to:

    1.) Hardcode the new port number on line 157/158 of the installer.php file
    2.) Omit the port option in the hostname when entering connection details on the front end.

    After that, it connects without issue.

    Any other suggestions for dealing with alternate port numbers?

    https://ww.wp.xz.cn/plugins/duplicator/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey Zipnar,

    That is a bit odd. I haven’t been able to reproduce that. Are you entering in “http://myhost:3312” or just myhost:3312?

    Thanks~

    Thread Starter zipnar

    (@zipnar)

    I have tried both ways, with and without the “http://” prefix. Both ways failed to connect.

    Yeah I’m not 100% sure; the code for the port extraction is just two lines, I’m not sure why it is not parsing the url for you correctly.

    $_POST['dbport']	= isset($_POST['dbhost'])	  ? parse_url($_POST['dbhost'], PHP_URL_PORT) : 3306;
    $_POST['dbport']    = (! empty($_POST['dbport'])) ? $_POST['dbport'] : 3306;
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Alternate database port’ is closed to new replies.