need help with wordpress error..

10 replies
hi ..i changed my wordpress hosting from one server to another...
am now getting error establishing database connection..

here is what i did...
1.downloaded all the wordpress files from original hosting
2.changed nameservers to new hosting.
3.created an add on domain on new hosting.
4.uploaded wordpress files in this new add domain
4.created a db and associated a user to it in new hosting.
5.exported the old database and saved it on my hard disk.
6.imported the database into the new hosting for the newly created db
7.open the wp-config file and changed the dbname username and password as it was for new db in my new hosting.
8.opened the site....getting "error establishing database connection"

tried:
checked the wp-config.php ..the info is correct.. even changed password again and checked..

repaired wp_options table for the new db..still getting the error..


my site was working fine just after changing the hosting but it gave error next day... i guess it was working fine the previous day because of cookies which i deleted the next day before checking my site..

i still have access to my old hosting...

is there any other solution..

can i restore back to original hosting...
#error #wordpress
  • Profile picture of the author Ken Marc
    Originally Posted by aniketsrivastava View Post

    hi ..i changed my wordpress hosting from one server to another...
    am now getting error establishing database connection..

    here is what i did...
    1.downloaded all the wordpress files from original hosting
    2.changed nameservers to new hosting.
    3.created an add on domain on new hosting.
    4.uploaded wordpress files in this new add domain
    4.created a db and associated a user to it in new hosting.
    5.exported the old database and saved it on my hard disk.
    6.imported the database into the new hosting for the newly created db
    7.open the wp-config file and changed the dbname username and password as it was for new db in my new hosting.
    8.opened the site....getting "error establishing database connection"

    tried:
    checked the wp-config.php ..the info is correct.. even changed password again and checked..

    repaired wp_options table for the new db..still getting the error..


    my site was working fine just after changing the hosting but it gave error next day... i guess it was working fine the previous day because of cookies which i deleted the next day before checking my site..

    i still have access to my old hosting...

    is there any other solution..

    can i restore back to original hosting...
    Have you deleted your wordpress installation from your old hosting? IF not, than it's a matter of changing the DNS records to the domain to restore your site on old hosting. IF however, you want to host your site on new hosting, I would suggest setting up a new wordpress installation and import your wordpress backup there. I guess, backupbuddy plugin may help you there.

    Ken
    {{ DiscussionBoard.errors[5179573].message }}
  • {{ DiscussionBoard.errors[5179591].message }}
  • Profile picture of the author Istvan Horvath
    4.created a db and associated a user to it in new hosting.
    Did you give the new user ALL the privileges?
    Signature

    {{ DiscussionBoard.errors[5179637].message }}
    • Profile picture of the author aniketsrivastava
      Originally Posted by Istvan Horvath View Post

      Did you give the new user ALL the privileges?
      yes i checked the all privilages box....

      as ken said..will changing back the dns back to old hosting work? since i have my installation there intact and havent touched anything in old hosting... apart from downloading wp files from there


      Regards
      Aniket
      {{ DiscussionBoard.errors[5179646].message }}
  • Profile picture of the author mgreener
    Hi,

    The hostname in wp-config.php may have changed. If it is currently localhost, it may need to be something different, or vice-versa. Check it out and check with your new host in order to determine the proper hostname.
    {{ DiscussionBoard.errors[5179759].message }}
  • Profile picture of the author Peterw
    The connection issue is most likely caused by incorrect database config values. Mgreener is also quite right some hosts use different hostname instead of the default localhost; Godaddy is a good example.
    {{ DiscussionBoard.errors[5180414].message }}
    • Profile picture of the author aniketsrivastava
      i have changed the dns to old hosting.... still the same problem...i have all the installation in the old hosting... havent touched anything there...

      can anyone guide me as to how can i restore back to old hosting...

      i guess changing the dns shud do....

      is there anything more to be done????

      this was my first site dont want to see getting it screwed...
      {{ DiscussionBoard.errors[5184594].message }}
      • Profile picture of the author aniketsrivastava
        finally.. my site working fine with old hosting...

        now can anyone guide me to a good tutorial so that i can move my wp site to new hosting without any errors?

        Regards
        Aniket
        {{ DiscussionBoard.errors[5186685].message }}

Trending Topics