Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I've just installed Wordpress 3.5 on my laptop (LAMP on Ubuntu 12.10) and when I'm trying to access the site from my phone but it doesn't load static files (css and images). I tried with Opera Mobile Emulator on my laptop and it works perfectly. I also have another Drupal site on my localhost which I can load from my phone without any issues. Both directories have chmod 777 permissions. What can cause that? Just tried to open the site from my sister's laptop but it except static file I can't access any post or page.

share|improve this question

3 Answers 3

It was from the Wodpress Settings, it uses localhost for the site address which is not accessible over the home network so I changed with my laptop's IP (in the home network)

from Settings -> General Change WordPress Address (URL) and Site Address (URL) from : localhost/wordpress to my.laptop.ip/wordpress

and everything works just fine

share|improve this answer
    
Yes, this is how it would normally work since localhost assumes your current device. So if you try localhost/wordpress on your mobile then it will definitely not work :) .. unless you also have an apache server on your phone (and a wordpress folder there as well). In which case the code on your phone will be executed instead of the one on your laptop. TLDR; - localhost or 127.0.0.1 means your current machine –  Prasad Dec 17 '12 at 9:12
    
I'm using 192.168.1.128 ( which is my home network IP for the laptop) –  Tosho Dec 17 '12 at 14:39

Make sure that your CSS files are called in respect to what they are being viewed from - what I mean by that is that your CSS/images are correctly linked to via the html.

For example, for my website I use <link rel="stylesheet" type="text/css" href="style/style.css" title="style" /> which will call the CSS relative to the root directory of my website, website. So my CSS us located in the folder website/style/style.css.

You may have something like 192.168.49.128 or localhost for your reference which would only make this work if you are viewing the website on your local network. If you'd like a more definitive answer, please supply us with a link to your website so we can actually view the source.

share|improve this answer
    
from Settings -> General Change WordPress Address (URL) and Site Address (URL) from : localhost/wordpress to my.laptop.ip/wordpress and everything works just fine –  Tosho Dec 17 '12 at 8:04
    
Ah, so pretty much what I said. –  ekaj Dec 17 '12 at 8:07

It'll be the lamp that your using is not forwarding the information to the outside.

You say you have Drupal running and its working fine, yet is this on another lamp?

In Ubuntu Lamp check your IPtables and check it has internet access, Ping Google.co.uk for example.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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