0

I am trying to open a WordPress site on an external server for which I do not have a domain yet using its ip address and an adjusted HOST file on my Mac to check it on the server. When I access the site I get errors like:

Warning: file_get_contents(http://domain/folder/wp-content/themes/theme-name/img/phonehead.svg) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/user/domains/domain.com/public_html/folder/wp-content/themes/theme-name/inc/control/file.php on line 16

I did find some articles on the same issues like this one. The issues is not that the path is wrong or the file is not there. It seems that it has something to do with either my router or the way I use the hosts file to resolve the domain to the new ip address.

The hosts file line I added should be fine, so perhaps there is an issue with my D-Link DVG-N5412SP router is handling the request. But nowhere did I find how I can fix the issue. What do I need to adjust?

Update

From another location I got

 Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/user/domains/domain.com/public_html/folder/wp-content/themes/theme/inc/control/THeaderControl.php on line 16

This might point me to the right direction. Working on it.

Community
  • 1
  • 1
rhand
  • 1,176
  • 4
  • 17
  • 45

1 Answers1

0

To make the path request local and not over the network I had to use the WordPress template tag get_template_directory() instead of get_bloginfo('stylesheet_directory') .

rhand
  • 1,176
  • 4
  • 17
  • 45