SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Guru Todd Temple's Avatar
    Join Date
    Mar 2005
    Location
    Tennessee
    Posts
    797
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How Do I Install Wordpress Before My DNS Settings Propagate?

    I have setup a new account through a reseller that supplies a shared IP. The way I have installed WordPress in the past is to use "localhost" as the MySQL database host name.

    The problem is that I want to complete the installation and style the site before I transfer the domain name and propagate the DNS settings. I am currently receiving errors that say "Error establishing a database connection".

    I have also tried several variations of the shared IP address in place of the "localhost". So instead of using "localhost" I have tried using the link if I were to preview the site, for example http://22.22.22.222/~site/.

    Can someone tell me if it is possible to replace the string entry of "localhost" with a number or something else so that I can complete the installation of WordPress?
    Todd Temple > T2 Design

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,862
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    If you are running Windows then you need to find a file called hosts (without an extension). You can enter the IP address and the domain name in there so that your computer associates the domain directly with that address without it having to wait to propogate.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Guru Todd Temple's Avatar
    Join Date
    Mar 2005
    Location
    Tennessee
    Posts
    797
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am thinking that I may not have access to that file. It is a reseller account through Host Gator. I believe that the web host manager configures those settings automatically... but I am not sure.

    Any other suggestions?
    Todd Temple > T2 Design

  4. #4
    SitePoint Wizard silver trophy ldcdc's Avatar
    Join Date
    May 2004
    Location
    Ploiesti
    Posts
    4,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    He was talking about the "hosts" file on your PC: http://en.wikipedia.org/wiki/Hosts_file.

    Your database server is still localhost. It is is installed on the same machine.

    Have you created a database and a database username on the server? You can login to cPanel and do that via http://IPaddress/cpanel

    Maybe you made a typo somewhere?
    HostPeek.com - budget hosts, compared
    CouponsNexus.com - web hosting coupons

    Ultra Cheap Hosts | Web Hosting Reviews Forums

  5. #5
    SitePoint Guru Todd Temple's Avatar
    Join Date
    Mar 2005
    Location
    Tennessee
    Posts
    797
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have created the database, a database user and password and then added the user to the database. Then I plugged in the info into the configuration file... leaving the localhost entry as is. When it didn't work, I assumed that it was the localhost entry, since I had added a new site to the HostGator web host manager before the domain name has been transferred.

    In other words, I wanted to install and style the WordPress before switching over the domain name from a third party. But in the HostGator web host manager, when creating the new account, I have added the actual domain name for the account that will be transferred once I have the WordPress the way I want it.

    Am I making since?
    Todd Temple > T2 Design

  6. #6
    SitePoint Addict ChiefLee's Avatar
    Join Date
    Apr 2009
    Location
    Lawrence KS
    Posts
    264
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to edit the hosts file on your local computer to set the ip of your hostgator server to the name that you want to access. That will allow name resolution for virtual hosting to work so you can get to the wordpress install wizard.

    So .....
    Log into hostgator setup the new domain (It doesnt matter if anyone else can access the site there yet.)
    Create your database.
    On your computer edit your hosts file, /etc/hosts if your running linux or C:/windows/system32/drivers/etc/hosts if your on windows
    put in an entry like this
    xxx.xxx.xxx.xxx www.domain.com domain.com
    where the x is replaced with your host gator ip address and where domain.com is your domain
    Drop wordpress in on your hostgator account and then visit www.domain.com (you might need to close all instances of your browser then open it again after making the hosts file change as some browsers will cache the ip of the previous look up for a while.

    Hope that helps
    Add your logo to Pocket Folders.

  7. #7
    SitePoint Guru Todd Temple's Avatar
    Join Date
    Mar 2005
    Location
    Tennessee
    Posts
    797
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ChiefLee View Post
    On your computer edit your hosts file, /etc/hosts if your running linux or C:/windows/system32/drivers/etc/hosts if your on windows
    put in an entry like this
    xxx.xxx.xxx.
    How about if I am on a Mac?
    Todd Temple > T2 Design

  8. #8
    SitePoint Addict ChiefLee's Avatar
    Join Date
    Apr 2009
    Location
    Lawrence KS
    Posts
    264
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe it is also /etc/hosts
    Add your logo to Pocket Folders.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •