• Hello All

    Long story short – I put my wordpress site live to my server yesterday, with some assistance from my host’s helpdesk. It’s all working. But I’ve noticed today that my host’s guy used:

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    in ‘wp-config.php’ using ‘localhost’ instead of ‘http://www.my-live-site.com’. And it works. Is this normal? Is ‘localhost’ acceptable there when it’s a live server and not local?

    Thank you.

Viewing 1 replies (of 1 total)
  • ‘localhost’ just means it’s on the same server as the wp installation

    So when installed on your PC, it means that the DB is on your PC
    When on a server it means the DB is also on that server

    Some hosting companies have their databases on separate servers optimised for DB transactions so you could well have a different server name there, but it won’t be a www.

Viewing 1 replies (of 1 total)

The topic ‘why does 'localhost' work on a server?’ is closed to new replies.