Wordpress Path

Discussion in 'PHP' started by oo7ml, Apr 4, 2012.

  1. #1
    Hi, does anyone know why wordpress doesn't just use relative paths instead of the full paths

    full path = www.mydomain.com/this-is-a-wordpress-page/

    relative path = /this-is-a-wordpress-page/

    This would then eliminate any problems when moving a wordpress site from one domain name to another etc...
     
    oo7ml, Apr 4, 2012 IP
  2. ryan_uk

    ryan_uk Illustrious Member

    Messages:
    3,983
    Likes Received:
    1,022
    Best Answers:
    33
    Trophy Points:
    465
    #2
    I have a feeling you won't have problems migrating a Wordpress site to another domain as the paths are generated dynamically by PHP. Therefore, as long as you have the correct domain set in Wordpress settings it won't be a problem. (Unless someone has hand written the absolute path.)
     
    ryan_uk, Apr 4, 2012 IP
  3. oo7ml

    oo7ml Well-Known Member

    Messages:
    656
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #3
    Ok, thanks but what about images and pdf documents that have been uploaded to media... should that be the same, thanks again for your help
     
    oo7ml, Apr 4, 2012 IP
  4. ryan_uk

    ryan_uk Illustrious Member

    Messages:
    3,983
    Likes Received:
    1,022
    Best Answers:
    33
    Trophy Points:
    465
    #4
    Use this to search and replace any "hard-coded" domain references in posts.
     
    ryan_uk, Apr 4, 2012 IP
  5. oo7ml

    oo7ml Well-Known Member

    Messages:
    656
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #5
    Cool, thanks...
     
    oo7ml, Apr 4, 2012 IP