最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

images - Graphics and Formatting Not Loading in WordPress on IIS

programmeradmin0浏览0评论

We have IIS 7.5 and we've installed WordPress (v3.3.1) through the Microsoft Web Platform installer ().

All works fine when we load WP locally (e.g. http://localhost/mywordpresssite), the graphics load fine. But when I enter the IP address or hostname accessing the site from a machine other than locally, none of the graphics or formatting appear.

Is there some configuration I have to set to get this working?

I've noticed that all the graphics etc. are hard-wired to 'localhost', which explains why I'm losing the images when accessing from a remote machine. e.g.

http://localhost/mywordpresssite/wp-content/themes/twentyeleven/images/headers/lanterns.jpg

Help!!

We have IIS 7.5 and we've installed WordPress (v3.3.1) through the Microsoft Web Platform installer (http://www.microsoft/web/wordpress).

All works fine when we load WP locally (e.g. http://localhost/mywordpresssite), the graphics load fine. But when I enter the IP address or hostname accessing the site from a machine other than locally, none of the graphics or formatting appear.

Is there some configuration I have to set to get this working?

I've noticed that all the graphics etc. are hard-wired to 'localhost', which explains why I'm losing the images when accessing from a remote machine. e.g.

http://localhost/mywordpresssite/wp-content/themes/twentyeleven/images/headers/lanterns.jpg

Help!!

Share Improve this question asked Mar 30, 2012 at 19:29 AshesToAshesAshesToAshes 1751 silver badge7 bronze badges 3
  • codex.wordpress/Moving_WordPress – soulseekah Commented Mar 30, 2012 at 19:34
  • OK but this talks about moving a wordpress site...I just created a new one but none of the links/images are loading because they have static URLs pinned to localhost... – AshesToAshes Commented Mar 30, 2012 at 19:41
  • codex.wordpress/… your domain URL is thus in desperate need of changing from localhost to a globally accessible IP/host. You have moved virtually. – soulseekah Commented Mar 30, 2012 at 19:42
Add a comment  | 

2 Answers 2

Reset to default 1

Check that your WordPress Address and Site Address are correct under Settings > General. ie., if you want it to be viewable on another computer, this shouldn't say "localhost" anywhere...

This may not be the right solution, but I had the symptoms (styles and images not loading) in a different case: Take a look at the XML generated by Wordpress for web.config. At least in some cases, it is incorrect. I've worked it through in the multisite case (different from this case) and had to change Rule 4 action to point to url="{R:2}" and Rule 5 to point to url="{R:3}".

<rule name="WordPress Rule 4" stopProcessing="true">
   <match url="^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*)" ignoreCase="false" />
    <action type="Rewrite" url="{R:2}" />
</rule>
<rule name="WordPress Rule 5" stopProcessing="true">
    <match url="^([_0-9a-zA-Z-]+/)?([_0-9a-zA-Z-]+/)?(.*\.php)$" ignoreCase="false" />
     <action type="Rewrite" url="{R:3}" />
</rule>
发布评论

评论列表(0)

  1. 暂无评论