Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Hello I just started using wordpress (complete noob) but I need a bit of help. I have installed wordpress and on a linux/centos webserver and this works fine. However when I use another machine, open a web browser, type in the url, the site looks different from what it looks like on my server. (On my web server, there is a choice to use the Graphical user interface as well)

The difference is the images don't appear on my machine (Looks like it can't find the media files). Also when I click on any link (the 'Hello world', login etc.), it says Firefox can't establish a connection to the server at localhost. I can see the images on the webserver and all links are fine. So I don't now what the problem

Just to let you know my wordpress url is localhost and my site url is also localhost if that may help.

share|improve this question
add comment

3 Answers

up vote 0 down vote accepted

"localhost" normally points to the webserver on the machine the request is made from.

You installed wordpress on your server to run under "localhost". So if you open a browser whilst on the server and go to "localhost" it will look for the site on the server and find it.

However, if you open a browser on your "dev machine" and go to "localhost" it will look for the site on your dev machine and it won't find it there as you installed it on the server.

Now, if you're connecting to the site using your server domain name (eg http://example.com), then whilst that request will work, the links to the images and other posts will not work because Wordpress creates those links as "http://localhost/path/to/image/picture.jpg" which your browser will look for on your local machine and not find there.

The best solution: Logon to the site from a browser on your server and change the URLs in the dashboard to your server's domain name and always use that domain name to connect to the site.

share|improve this answer
    
This is pretty much the answer I am looking for thanks –  Shehzad009 Nov 29 '11 at 16:29
add comment

Hi there must be tons of reasons why your images does not show up.

What happens when you install a freshly downloaded wordpress ? does the default theme works ? if not there must be a problem with your server configuration.

share|improve this answer
    
No the defaut themes are the but only on the linux webserver GUI. On my machine I can't see the themes. Nor any other machine. –  Shehzad009 Nov 29 '11 at 11:42
add comment

The answer is already given by ZweiBlumen. But for your images to appear when viewing from another machine, here is a solution. (I usually do this wghen porting my websites from development to production server.)

If you have database access, just save an sql dump of the database,open it in any text editor and do a find and replace on 'localhost' to 'yourdomain.com'(where yourdomain,com=your domain name.extension). Save the file and replace your existing database with the newly saved sql. Note: Before doing the last step make sure you have a backup of your old db.

share|improve this answer
add comment

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.