Website Only Shows Text Content With All Graphics Missing

My site looks perfect from localhost (and LAN), but not from the internet. Why can’t I see CSS/styles and images on my pages?

The quick answer is that all of your generated links in the HTML source of the page are still using local addresses (usually “localhost”)…

Fix Local Resolve

Load your website in a Browser (Chrome, IE, Firefox) from outside, right click on the page, and select ‘View Page Source’, and you will see that all links to the CSS (style) and Graphic content (images) are either:

  1. Of the form http://localhost/ or http://127.0.0.1/ or http://192.168.0.xx/
  2. Or using a domain name that is made up or does not have proper global DNS set up.

None of these locations/URLs are reachable from outside. They are only reachable from the server (i.e., the local system), and/or possibly only within the LAN.

You have to use a working domain name for the website [that is not localhost (127.0.0.1) nor the LAN IP].

The domain name should resolve to the public IP address of the server, and all requests to that IP address should be properly routed and unrestricted to the server.

Update WordPress Address

With WordPress originally installed on “localhost”, you’ll need to go into WordPress Setting, General tab, and change the “WordPress Address” and “Site Address” to something other than “localhost” or the LAN IP (e.g., to an address that can be reached from outside).

If you don’t have a domain name, you can use your public IP address (the address assigned to the router), but this would also require you to make sure this IP is port-forwarded from the router to the LAN system.

Browser Hard-Refresh

When you test your website from outside, make sure to hard-refresh the page (in your Browser) by pressing Ctrl-F5 so everything is reloaded each time and you don’t get cached pages and old results.

6 thoughts on “Website Only Shows Text Content With All Graphics Missing”

  1. Whenever I enter my IP or my .noip-domain into the “WordPress Adress (URL)” . it says “The WordPress address you entered did not appear to be a valid URL. Please enter a valid URL.” pls help

  2. I opened youtube in all browsers but its showing without graphical content . I tried to refresh {ctrl+f5}. but it didn’t work.

    1. Check your Windows Hosts file. You might be using ad-blocking resolves, or are resolving youtube domains to 127.0.0.1.

      Otherwise, open the source page of the website, and check the CSS URLs domain names and try to ping them – see what IPs they resolve to, etc.

  3. I have a wordpress website that I can access within my local network. I can browse to it locally using the following url formats:
    http://192.168.xx.xx/mytestwordpress
    http://myqnapname.myqnapcloud.com/mytestwordpress

    I can ping my ‘myqnapname.myqnapcloud.com’ from outside my network fine.

    I had Qnap helpdesk double-checked my setup and installation, and commented:
    “I had accessed your NAS and verified the myQNAPcloud service is enabled correctly. I suppose you are using http://192.168.xx.xx/mytestwordpress to access WordPress locally. Now you just need to use http://myqnapname.myqnapcloud.com/mytestwordpress , then you can access the WordPress over Internet. Please give it a try, thank you.”

    But it still doesn’t really work. It takes almost a minute and it loads my front page with only texts and without the background image

    Kindly advise or point me to step-by-step guide or instruction. Your help is greatly appreciated!

    Many thanks,
    Mel

    1. It takes almost a minute and it loads my front page with only texts and without the background image

      Go into your WordPress dashboard, Setting, General –

      And update the “domain-name” in WordPress Address –
      From: http://192.168.xx.xx/mytestwordpress
      To: http://myqnapname.myqnapcloud.com/mytestwordpress

      I would not advise to edit the other part of the URL (/mytestwordpress) to anything else until you have this working.

      You’ll likely also need to update Site Address the same way, but you can try it with just the above first.

      Make sure to Ctrl-F5 (hard refresh) the webpage when testing this to make sure its not reloading from the cache.

      The reason it takes so long to load and there is no CSS nor images is because the source-code of the page is using the LAN URL to attempt to pull in the CSS and images – and the LAN IP is not accessible from the internet, only locally.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>