• Resolved kidznc

    (@wsp-kk)


    I’m presently wrestling with a site that I moved over with Duplicator not long ago. I thought everything had gone smoothly, but apparently, something in the URL structure did not go so well.

    Presently, the site’s domain name is duplicated if placed in wp-config as intended. E.g., if wp-config reads:

    define(‘WP_SITEURL’, ‘https://mysitename.com’ . $_SERVER[‘HTTP_HOST’]);
    define(‘WP_HOME’, ‘https://mysitename.com’ . $_SERVER[‘HTTP_HOST’]);

    …then URL paths will read “https://mysitename.com/mysitename.com” (and hardly anything will work).

    Now, if wp-config reads:

    define(‘WP_SITEURL’, ‘https://’ . $_SERVER[‘HTTP_HOST’]);
    define(‘WP_HOME’, ‘https://’ . $_SERVER[‘HTTP_HOST’]);

    …then everything will work fine, because “mysitename.com” is being written onto the URL somewhere in a .php or database file.

    I am not convinced this is how it was intended to work, for images are rendered with URLs such as the following:

    http:/wp-content/uploads/2015/01/pageLogo.png
    …as opposed to:
    https://mysitename.com/wp-content/uploads/2015/01/pageLogo.png

    This includes the images that are coded into my theme through the Theme Options.

    Any ideas? Anything else I can provide to pinpoint the problem – just let me know.

    -Kurt

    https://www.ads-software.com/plugins/duplicator/

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

    Updating the variables to read like:

    define(‘WP_SITEURL’, ‘https://’ . $_SERVER[‘HTTP_HOST’]);
    define(‘WP_HOME’, ‘https://’ . $_SERVER[‘HTTP_HOST’]);

    Should not be an issue. Its more of a preference… I personally don’t like that approach but lots of sites use it that way. The Duplicator currently is not able to repair double pathing setups, but we are working on trying to better detect it.

    You can read more about the issue here:
    -> Browse to: https://lifeinthegrid.com/duplicator-faq
    -> Find question: “Why do I get a 404, redirected, path errors or unable to login after installing?”

    Hope that helps!

    Thread Starter kidznc

    (@wsp-kk)

    I understand.

    That said though, do you have a list of which .PHP files which would have been affected by The Duplicator in regards to the double-pathing issue?

    I’m not concerned about loading each file in Dreamweaver and fixing them manually – all I’m concerned about is actually getting it fixed. It seems as if the plugins I use to place photos on the site add their URL prefix from wp-config, so using “https://” alone is a concern for me.

    Thank you so much,

    Kurt

    The only PHP files the plugin attempts to update are the wp-config.php and if you have a .htaccess file it will backup the original and rename it to .htaccess.orig and create a new one that is stripped down.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Site URL/link structure incorrect after duplication’ is closed to new replies.