Support » Fixing WordPress » URL discrepancy between localhost and live

  • Resolved pszeinert


    I use a PHP IDE (Eclipse) for quick renderings of my site.

    My local files are stored at http://localhost/<strong>problemsite</strong>

    My live files are stored at http://<strong>problemsite</strong>

    The live site is set up as a sub-domain, but can also be typed<strong>problemsite</strong>

    The problem is that when I define images, for example background in the imported CSS files, I can successfully load them using /wp-content/themes/thematic/library/imgs/file.gif

    …however, on my local computer, the files will not resolve unless I absolutely link it as <strong>http://localhost/problemsite</strong>/wp-content/themes/thematic/library/imgs/file.gif

    I have tried any number of periods before the file and have scoured many sites before coming here. I even tried adding this snippet:

    define('WP_HOME', 'http://'.$_SERVER['HTTP_HOST'].'/problemsite');
    define('WP_SITEURL', 'http://'.$_SERVER['HTTP_HOST'].'/problemsite');

    to the wp-config.php file, but to no avail.

    This is the first problem I have encountered that I have not been able to find a resolution for.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘URL discrepancy between localhost and live’ is closed to new replies.