WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Theme not visible on external browser (21 posts)

  1. golf1025
    Member
    Posted 7 years ago #

    Hi, I'm new here so please be kind.
    I installed WP on my local PC. Everything works fine.
    Except. When a user from the internet logs on to my website http://www.jedeboer.nl/wordpress the blog shows plain text and is not formatted with the chosen template (default 1.6) (which I do see correctly on localhost).
    Any suggestion on what I do wrong/how to correct are greatly appreciated.
    Jan

  2. boiler
    Member
    Posted 7 years ago #

    Your site is not properly set up to be accessed by a remote user on the internet.

    All the html links point to addresses such as href="http://localhost/wordpress/wp-content/themes/default/style.css" rather than using the domain name.

  3. jrawle
    Member
    Posted 7 years ago #

    You need to go into the admin panel and change the URI of your blog (under the options tag) to use your proper domain name instead of "localhost".

    You may have problems with this due to the admin panel also trying to use "localhost", meaning you would be changing settings on your local computer not on the online version. As you don't have any content in your blog yet, I suggest deleting the database and creating it again, as that should fix it.

  4. golf1025
    Member
    Posted 7 years ago #

    Thanks guys,
    You solved my problem! I now have the full graphic version online for my external users. But I now have the plain version on localhost. I didn't delete the database however.
    Would there be a way of having the best of both worlds without having to re-edit the urls back and forth from local host to http://www.jedeboer.nl everytime I edit my blog?
    Regards,
    Jan

  5. jrawle
    Member
    Posted 7 years ago #

    I'm slightly confused about your setup. I assume you have a webserver and MySQL on your own computer for testing, and that your site is hosted on an external machine with its own MySQL database.

    When you say, "every time you edit your blog", do you mean when you write a post? Surely you write the posts on the online version, so you don't need to transfer them to your local machine.

    Once you have separate databases on each machine, each with the correct URL setting for that machine, it should work fine. You can modify your WordPress theme and any other related files, test them offline and upload them. As you are not transferring the database, there should be no need to keep changing the setting. You should only need to edit the URL if you are moving the database between machines (using mysqldump or similar).

    If you aren't moving the database, but you still can't get both machines working, I suspect you are changing the URL setting on the opposite machine each time as I suggested before (due to the admin panel using the setting too).

  6. golf1025
    Member
    Posted 7 years ago #

    Thanks jrawle,
    Thanks for your reply. I'm sorry if my setup seems to confuse you. I'm running everything on a single machine, my pc at home. So there is no externale machine with it's own WordPress installation/MySQL database etc.
    This is my actual setup:
    1. Windows XP Home SP2
    2. Abyss Web Server X1 2.4
    3. MySQL Community server 5.0
    4. MyPHP 5.0
    5. phpMyAdmin 2.9
    6. WordPress 2.1
    At presently I'm in the process of embedding Galley2 into WordPress.
    When administring/configuring WordPress, I set the URL's to LOCALHOST so that I can see everything I'm doing.
    When I want to see how everything works/looks for an external user, I change the URL's back to http://www.jedeboer.nl and use proxify to simulate what the external user sees.
    Now my question regadering 'best of both worlds' is whether there's a way/workaround to not have to change the URL's everytime.
    I hope this clarifies my previous question.
    Thanks again for your help so far.
    Regards,
    Jan

  7. jrawle
    Member
    Posted 7 years ago #

    Now I see. My reply is that you shouldn't need to "change the URL's back to http://www.jedeboer.nl and use proxify to simulate what the external user sees". The site should work exactly the same whether the domain is localhost, jedeboer.nl or somethingelse.com.

    Changing the domain shouldn't affect anything. Moving to a different server/PHP/MySQL version when the site goes live is much more likely to have an impact, but you can only test that by copying the site to the other server.

    The problem, as I said, is because you are changing the URL while keeping the same database.

    When your site goes live, will you be uploading the contents of your database too? I found the easiest way to do this is to do a simple search/replace on the dumped database, from localhost to jedeboer.nl

  8. golf1025
    Member
    Posted 7 years ago #

    Thanks for your patience jrawl,
    But I'm afraid your latest answer confuses me now.
    I am under the assumption that I only need one database, namely the one that resides on my pc. Also my site is actually live, you can surf to http://www.jedeboer.nl/wordpress.

    On my pc at home when in the General Options tab of WordPress admin, I can set both the WordPress address (URL) and Blog address:

    Setting you see I see on my pc
    --------------- ------------------- ----------------
    localhost no theme background theme background
    http://www.jedeboer.nl theme background no theme backgr.

    You can surf to http://www.jedeboer.nl/wordpress to see it, with the full theme / or no theme background.

    I will do most posts at home from my pc. Only when traveling abroad would I need to post from an internetcafe.

    I'm afraid I'm still confused as to why I see two different views of my site depending on what url I set.

    Regards,
    Jan

  9. jrawle
    Member
    Posted 7 years ago #

    Hold on... am I right in thinking you are hosting your website on your home PC, rather than using a commercial hosting company?

    Then why do you need to use localhost at all? Just use the hostname for your machine as if you were an external user.

    Unfortunately I'm not familiar with the webserver you are using, or about proxify. I only know about apache. If I was testing a site, I'd used name-based virtual servers to allow me to have multiple versions. You can use a static hosts file to make different names resolve to your local machine.

  10. Doodlebee
    Member
    Posted 7 years ago #

    I don't understand your setup myself...but I can offer a *little* bit here.

    Localhost is *very* different from regular internet traffic. A locahost server is a *private* server that resides on your home computer. You can have your setup on your home computer with MySQL, PHP, Apache - all the goodies - just like you would get from your own hosting provider. However it's kep private because it resides on your own hard drive, and the only way to access it is through a local IP address - usually 192.168.1.1 (or something similar). 192.168.x.x IP addresses are reserved solely for the purposes of private access - meaning it's the IP address of your computer, whether or not you are actually connected to the outside world through the internet. If you are actually logged into the internet and open your browser window and type in "localhost" or a "192.168.x.x" IP address, it'll look *on your own hard drive* for the server - it will not look to outside access. That's what that IP is reserved for.

    Your stylesheets and files are pointing to "localhost". So when you upload the files, etc. to the hosting space that actually is accessed via a regular IP address served up by your host, then you need to have them show the file paths to that server. If you have it via localhost, the internet will not know where to look, because such an IP doesn't exist publicly.

    You may have a localhost setup on your home computer. I do, myself. I have an installation of WordPress running on my hard drive, and it's used for testing out my site designs before I put them on a live site. When I *do* put them on a live site, I make sure all instnaces of "localhost" are changed to the proper path for the server it resides on - which is no longer my own when it's made live.

    The URL "www.jedeboer.nl" does not live on your home computer. According to whois, it lives with the host of "firstfind.nl" - which means firstfind.nl is your regular web host, and that's what's serving up your live site to the rest of the world.

    Trying to enter a post on your localhost computer and hoping it shows up on your live site is like writing a letter on a piece of paper, setting it on the table, and then wondering why the letter never got to your mother two weeks later. They aren't even in the same area to have access to one another.

    When you do posts from your home on your PC, or whether you do them from an internet cafe when you travel, you will log into your blog's admin area - the one that lives on your hosts' site. The posts will appear on your live site - but not your localhost. They are not connected together.

    Unless I'm missing something, and *you* are "firstfind.nl", and the hosting service is run from your own office (and if so, then I don't know what to tell you because I've never run my own hosting server) - then the two do not connect to one another. You can use your localhost environment for development purposes - but if you want stuff to appear on your live site, them you *must* move everything to the externally hosted server.

    I hope that made some sense!

  11. golf1025
    Member
    Posted 7 years ago #

    Thanks hrawle and doodlebee for your clear replies.
    In fact everything I run and do resides on my home pc. My domainname is hosted with an external provider: firstfind.nl. I used to have all my wp-stuff hosted by them but because filespace became too expensive i decided to switch the whole lot to my own pc. My domainname still resides with firstfind, so i did a dns redirect and opened the appropriate ports on my router. So now anyone typing http://www.jedeboer.nl/nnnn arrives on my pc's harddisk. And when i set my wp urls to http://www.jedeboer.nl/wordpress you and everyone else can see my blog nicely themed. It's only when i set the wp urls to localhost that the themes don't show up anymore.
    Kind regards,
    Jan

  12. Doodlebee
    Member
    Posted 7 years ago #

    Okay - well that makes things a little bit more clear. (At least for me, anyway.) I can sorts see your problem a little bit better.

    What I would suggest as the solution is to just leave your blog URL (in the options) set to your visible and public URL. That way the theme files always point to the right place and you aren't losing anything.

    There's really no need to use your "localhost" when the site is live...you can easily just log in to the admin area on the server and do everything you need to do.

    That's me, though - that's what I would do. I'dput up another installation for development purposes when you don't want things to be visible on the live site (you can use the same database, just change the prefix in the wp-config file) - just don't enter any posts into the development area. Then, when you make theme changes that eventually go live, you just have to move the files from one folder to another.

    Hopefully that made sense!

  13. ArborBarber
    Member
    Posted 7 years ago #

    Golf1025,
    You need to register with a domain name server. Here's what you can do. Setup your home server with a static ip address. Go to some place like DYNDNS.COM http://www.dyndns.com and register for a static ip (free). Pick a name, "Golf1025.gotdyndns.com" and set "Golf1025.gotdnydns.com" to point to your static ip (which is your webserver at home.) You'll have to download their(dyndns) update client (also free). If you're using a router set up port forwarding for the ports you need to forward to the static ip.If you have a problem with setting this up on your router check out http://www.portforward.com. You'll have no problem after that, you'll be able to log on using localhost or your new static ip address(http://golf1025.dyndns.com). You can also take a look at xammp. http://www.apachefriends.org/en/xampp.html They have a package deal(free) that installs on a windows system, includes apache,mysql,myphp,filezilla,mercurymail transport system... It will set up apache,mysql and myphp on your windows system without all the manual fuss. If you go the static ip route make sure you change the http address for wordpress to the address you choose at dyndns (http://golf1025.dyndns.com). If you try the xampp install remember that the default install will be installed to program files. So to get your website it would look like this "http://golf1025.gotdyndns.com/wordpress"
    to log on (admin) it would look like this..."http://golf1025.dyndns.com/wordpress/wp-login.php".
    The way xampp installs is as follows, "c://program files/xampp/". The path with wordpress installed would look like this "c://program files/xampp/htdocs/wordpress"

  14. golf1025
    Member
    Posted 7 years ago #

    Thanks doodlebee,
    I set my blog url to http://www.jedeboer.nl/wordpress and left my Word Press address url at localhost. Unfortunately this leaves my live site without the template. So it's still either good on the web or good on my pc, but not both.

    So I need to try your second suggestion "I'dput up another installation for development purposes when you don't want things to be visible on the live site (you can use the same database, just change the prefix in the wp-config file) - just don't enter any posts into the development area. Then, when you make theme changes that eventually go live, you just have to move the files from one folder to another." Could you explain howto do this or point me to the right documentation?
    Thanks,
    Jan

    Hi ArborBarber,
    Thanks for the trouble of looking into my 'problem'. I'm probably too new in this whole matter to understand the gist of your suggestion. You are quite clear on what I should do, but not in explaining why doing it would solve my problem (no offence meant).

    My domain name is actually registered with a regular ISP. This ISP also provides the facility to route my domain name to my static IP (85.xxx.xxx.xxx)on my pc.

    On my router I do portforwarding to the IP of my pc (192.168.xxx.xx). That's how users on the web can reach my site. What I don't understand is why i should do the DynDNS and how this would differ from my present setup. And why your suggestion would solve my problem of seeing & not seeing the theme background dependent on where my url's point to.
    Regards,
    Jan

  15. ArborBarber
    Member
    Posted 7 years ago #

    Jan,
    I thought you may have been having an issue with a dynamic ip address... however that's not the case at all.
    I was having the same issue you were and changing the wordpress address under the option menu solved my issue all the way around...from internet side and lan side, that's why I thought it was a ip address issue and that by getting a static ip it would solve your problem. The other suggestion about xampp makes it pretty easy to setup wordpress. If you put... /wordpress in your address you should be able to view the site from either side (net/lan). Is your site in a different directory other then wordpress? If your seeing a broken page(text left justified) I think the issue is going to be with the options setting (address).

  16. golf1025
    Member
    Posted 7 years ago #

    ArborBarber,
    Thanks for your quick reply. I'll try the xampp route, though I think it would mean re-doing everyting from scratch. Because I'm also trying to embed Gallery2 in WordPress, that'll take some work and I'm not there yet.
    Regards,
    Jan

  17. ArborBarber
    Member
    Posted 7 years ago #

    Jan...
    Please give me 1 minute...yes you are correct though. 3 year old...back in a few

  18. ArborBarber
    Member
    Posted 7 years ago #

    Jan,
    Yes, you would be starting from scratch. Except it sounds like your really right there, I mean I think it's an address issue. If your "blog" is in your wordpress directory and you didn't change anything you should be able to see your site. Is WP installed in your htdocs directory? "C://program files/server/htdocs/wordpress"? It doesn't have to be in program files, it could be at root. The important thing is for WP to be in htdocs. You can change the blog location later if you want, what you want to do now though is just confirm that you can see it from both sides, lan/wan. I had the same issue as you describe and it was the address being wrong under options. If you do the xampp install plan on about 1/2 a day. If you're somewhat familar with the software maybe an hour...I'm a noob with WP but correcting the address under options corrected my issue, and it was the very same problem you describe. Try putting the address in again, "http://jan.your.address.com/wordpress"
    and make sure to hit update (I know you probably have done this 10 times now.)
    BTW, I'll also be trying to do the gallery2 plugin...

  19. Doodlebee
    Member
    Posted 7 years ago #

    I wish I could be of more help - but I can say this - I've used Gallery 2 several times (implementing it on a site right now, actually) and it's pretty easy. I think your scary/hard part is getting this current issue fixed - Gallery 2 is cake.

  20. ArborBarber
    Member
    Posted 7 years ago #

    doodlebee,
    I'm glad to hear Gallery 2 is cake, I hope I can find you when I get ready to do the install! I have WP 2.1 and I'm real reluctant at the moment to experiment with pluggins and widgets because of compatiblilty issues...I had a little problem with "simple forum", at least when I went to uninstall the plugin. It left a tag in my page header. Maybe you could give a link to your blog so when Jan and I go to do the install we could get your assistance?
    edit...I just noticed your nick is a link, cool beans! You might just see Jan and Arborbarber posting on your site! :}

  21. golf1025
    Member
    Posted 7 years ago #

    Doodlebee,
    Thanks for your help so far. Except for the url bit I've been going on about, I quite agree that 2.1 is cake and very nice (until you get into the more ccomplex issues like embedding/linking Gallery2 and using plugins to pickup pictures from anywhere and drop them in WP).
    I think it's time to call this issue resolved.
    Regards,
    Jan

    ArborHabor,
    If I can be of any assistance to you, dont hesitatie to contact me on this form.
    Regards,
    Jan

Topic Closed

This topic has been closed to new replies.

About this Topic