I'm trying to create a local version on XAMPP of my company's WordPress website.

All well and good except for the theme images aren't loading. (CMS images are loading)

Looking at the image paths, I notice why they aren't loading. The root directory isn't there. It is;


Should be;


This is the code I'm using for the theme images;

<span><?php the_title(); ?><img src="<?php echo get_template_directory_uri(); ?>/images/border-white.png" class="underline"></span>

I've also tried it with;

<?php bloginfo('template_directory'); ?>

but same outcome.

The strange thing is, this same template tag is sucessfully loading other resources like the scripts (from functions.php)

  • I think you should post code from wp-config.php excluding database details.
    – Robert hue
    Sep 30, 2014 at 16:43

2 Answers 2


Probably your localhost siteurl option it's not set up right.
Try to add this on your wp-config.php file:


If it works, then it proves that your siteurl option (on your options table) it's not correct.

hope that it helps,

  • I tried, but no change. I already made sure the siteurl was correct in the database. And anyway, the correct uri is loading for scripts, just not for images. Can't understand why this would happen. Sep 30, 2014 at 15:40

What about .htaccess maybe you have to change RewriteBase / to RewriteBase /stepladder

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.