Support » Installing WordPress » Renaming database via GoDaddy

  • I recently attempted to switch domain names for 2 sites I run that are both hosted by GoDaddy but only one is a WordPress site. The switch worked for the other site but NOT the WordPress one. I know I need to change my database name in relation to the WordPress install by accessing the wp-config.php file but I can’t figure out how to do this for it to work. Can someone walk me through this? The site is now down and I need to get it back up ASAP. Well it’s up but if anyone plugs in my URL, the site can not be opened. Thanks!
    Erin

Viewing 7 replies - 1 through 7 (of 7 total)
  • You’re mixing apples and oranges. If you changed the domain, then you need to find/replace URLs in the database with sql queries. If you just changed database servers, then changing that in wp-config.php is pretty straightforward. Editing wp-config.php « WordPress Codex

    Which did you do? Post your site URL, even if it doesn’t work.

    Thread Starter Erin Sweeney Design

    (@esweeney113yahoocom)

    Well, I contacted GoDaddy and they were able to make a switch on their end. Now my old site is opening under the URL that was my blog a few days ago. The canned site (as I call it) is http://www.jeaniepromo.com. My blog should be http://www.jeaniecommunications.com but it is not opening now. GoDaddy told me I needed to fix the database name by accessing the WordPress configuration file (wp-config.php) but when I open that file, it’s asking me for my old database name (I’m assuming this is the non-blog site database name) but I don’t have that site’s database name. I don’t even know if I need it! To be honest, I’m totally confused at this point. I feel like I’ve spoken to Godaddy and even reps from my old site (it’s a canned site where my customers can go to purchase items…I did not set it up and know nothing about how it’s hosted, etc.) and no one seems to be too helpful. Any help/advice is much appreciated! I am not a programmer so this is all rocket science to me.

    You need to go into your GoDaddy hosting account for the wordpress site and look in the mysql database section and find the name of the database so you can change it in wp-config. Look in the GoDaddy help files for using your hosting account.

    but when I open that file, it’s asking me for my old database name

    I don’t know what you mean by that. Opening wp-config in a text editor isn’t going to ask for anything.

    Thread Starter Erin Sweeney Design

    (@esweeney113yahoocom)

    Thanks! I was told to do this for WordPress:

    Edit the wp-config.php file. You will need to update the following line with the name of the new database server.

    define(‘DB_HOST’, ‘youroldhostname’);

    *******

    That’s what I meant by it’s asking me for my old host name. I went in to my files by accessing my Godaddy hosting account login. I found my database name for what I believe is my blog site. So, I don’t know what name goes in the ‘youroldhostname’ section above. I just meant the instruction for me is to enter an old host name and I’m unsure if this host name is related to my old site or my WordPress site. I believe the name in there now (when accessing the wp-content.php file) is the same name I see when I open the My SQL file.

    I guess the short of it is, why would my WordPress site not just automatically link now to jeaniecommunications.com when my other site easily went from jeaniecommunications.com to jeaniepromo.com? What is it that I have to do differently since the site is a WordPress blog that I did not have to worry about with the site that is not a WordPress blog?

    Thanks!!!

    @esweeney113@yahoo.com,

    In addition to the info songdogtech shared, be sure that you also update the the database name and password for the database now associated with JEANIECOMMUNICATIONS.COM. This will need to be done in your wp-config.php file. If you’re not quite sure what password to use here, you can always update this one in your account:

    http://community.godaddy.com/help/3310

    Hope this helps and let us know if you have any questions.

    ^Trevor

    Thread Starter Erin Sweeney Design

    (@esweeney113yahoocom)

    Thanks songdogtech and GoDaddy. I was able to change then update my password associated with what I believe is the jeaniecommunications.com site. The database name for the WordPress site was the same as the database name I saw when I opened the wp-config file. I left that as is and updated the password. Now, the site will open…but the template and all of the images lined to it are not showing up. I attempted to then access the dashboard by adding /wp-admin at the end of the URL but it redirects me to what is now the jeaniepromo.com site and says that page can not be found!?!? Do I need to set up 2 completely separate hosting accounts, one for each domain name, to get this to work correctly?? They really don’t need to be linked. All I do is reference the shopping site (jeaniepromo.com) on my WordPress blog by adding a link to it.

    Thanks for all the advice, guys!! I really need to get this working right.

    Erin

    With WordPress, you can’t simply change domains at the host; there is a process you have to go through. That’s why I pointed out above that you’re mixing too different problems.

    You changed domains, which means you have to change URLs in the database so the site will work with the new domain. If you look at the source of the page jeaniecommunications.com, you will see that all the image and CSS URLs still point to jeaniepromo.com

    See this page http://codex.wordpress.org/Changing_The_Site_URL for instructions on how to make changes in wp-config to force the new domain in the database.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Renaming database via GoDaddy’ is closed to new replies.