Blog Not Working After Transfer To New Host

by Didi
45 replies
Hello Warriors,

I kind of need your help guys. I've just transferred a Wordpress Blog to a new host and after uploading the files and database on the new server, I got this error,

"Error establishing a database connection

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request."

I did the editing of the username and password from within the wp-config.php file but the error is still showing.

Can someone advice this newbie pertaining to this matter? Thanks in advance guys.


Didi
#blog #host #transfer #working
  • [DELETED]
    {{ DiscussionBoard.errors[6219581].message }}
    • Profile picture of the author Legit SEO
      Contact the support desk at your new host and they should be able to walk you through everything
      Signature

      {{ DiscussionBoard.errors[6220691].message }}
    • Profile picture of the author RSMarketing
      Go into the wp-config file and make sure everything is correct for your database,
      Database Name
      Database Location
      Database User
      Database Password

      Let us know how you make out.

      -Rich
      Signature
      (¯`·._.·Want Free Instagram Followers?·._.·´¯)
      {{ DiscussionBoard.errors[6220733].message }}
    • Profile picture of the author kellter
      Make sure your database name, database username and password is set up right in config file. Also make sure the database user is attached to the database with all the privileges.
      {{ DiscussionBoard.errors[6220932].message }}
    • Profile picture of the author seanicasia
      How big is your blog and how did you do the 'transfer'? If you simply downloaded the old files and uploaded it to the new host, it won't work.

      If you didn't have too much content to start with, I'd suggest re-installing the blog properly from scratch, then re-set up your blog according to your last specs, and copy and paste the content accordingly. That's the safest.

      Then again, if you've got way too many pages, it's a huge hassle.

      I'm not sure if there's an easier way.
      Signature
      Make a sale in 30 days or I'll Paypal you $500 >> Details here <<
      {{ DiscussionBoard.errors[6221435].message }}
    • Profile picture of the author TiffLee
      Originally Posted by PassiveIncomeTeacher View Post

      Are you sure the user you are using has the correct permissions on the database? And do you have the right information configured for the database; port, path, and database name?
      What this person said.

      ... there is something wrong with your database usernames and passwords.
      {{ DiscussionBoard.errors[6221630].message }}
    • Profile picture of the author Didi
      Originally Posted by PassiveIncomeTeacher View Post

      Are you sure the user you are using has the correct permissions on the database? And do you have the right information configured for the database; port, path, and database name?
      I have checked everything and all are in place. The problem has been resolved but there is one more thing that I would like to inquire. Do I need to install a fresh Wordpress Blog in the new server before I start transferring the files and the database?

      Didi
      {{ DiscussionBoard.errors[6222811].message }}
  • Profile picture of the author ckbank
    Originally Posted by Didi View Post

    Hello Warriors,

    I kind of need your help guys. I've just transferred a Wordpress Blog to a new host and after uploading the files and database on the new server, I got this error,

    "Error establishing a database connection

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request."

    I did the editing of the username and password from within the wp-config.php file but the error is still showing.

    Can someone advice this newbie pertaining to this matter? Thanks in advance guys.


    Didi
    Wow. Could be so many different things? I know it's basics, but did you transfer DNS? Did you mess around with ftp? Has it been 24 hours since you transferred DNS? Are you using a plugin that might be causing the problem? Also, even an empty space in the wp-config.php can give you an error. Hope this helps.
    {{ DiscussionBoard.errors[6219601].message }}
  • Profile picture of the author ckbank
    Originally Posted by Didi View Post

    Hello Warriors,

    I kind of need your help guys. I've just transferred a Wordpress Blog to a new host and after uploading the files and database on the new server, I got this error,

    "Error establishing a database connection

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request."

    I did the editing of the username and password from within the wp-config.php file but the error is still showing.

    Can someone advice this newbie pertaining to this matter? Thanks in advance guys.


    Didi
    Wow. Could be so many different things? I know it's basics, but did you transfer DNS? Did you mess around with ftp? Has it been 24 hours since you transferred DNS? Are you using a plugin that might be causing the problem? Also, even an empty space in the wp-config.php can give you an error. Hope this helps.
    {{ DiscussionBoard.errors[6219620].message }}
  • Profile picture of the author Dietriffic
    Did you contact your host?

    Could you not have got them to do the transfer for you?
    Signature

    — Melanie (RD)

    Weight loss/fitness marketers earn 75% per sale with... The Fat Reversal Formula
    Join me: Twitter and Facebook

    {{ DiscussionBoard.errors[6219634].message }}
  • Profile picture of the author Didi
    @PassiveIncomeTeacher

    Yes, I have doubled checked those information and they are correct. And the good news is, I've solved the issue.

    The mistake that I did was, I didn't set the database privileges. After I checked on all the boxes and save, the problem was resolved.

    And I would like to thank you for taking the trouble to reply to my thread. Thank you very much.

    Didi
    {{ DiscussionBoard.errors[6219654].message }}
  • Profile picture of the author DireStraits
    Check your database server location. At most hosts, the MySQL server runs on the same physical server on which your files are stored, making the host either localhost or 127.0.0.1

    Both mean the same (i.e. "this server"/"the same server as this file"), but whereas most hosts allow you to use these interchangeably, some only accept one of the two. In rare cases you might find that the database server is separate and uses a completely different IP address.

    Besides that, ensure you have the right username. Some hosts add a prefix to the username you've selected. For example, turning "yourusername" into something like "user1_yourusername". The same goes for database names.

    Then double check that your database user does in fact have permission to access the database in question.

    EDIT: Sorry - late to the game. I see you've resolved this now. Good stuff.
    {{ DiscussionBoard.errors[6219671].message }}
  • Profile picture of the author James.N
    You should have exported the old SQL file using phpmyadmin.

    Next you want to create a database, create a new user (or use an existing user), give that user full access to the database.

    Using phpmyadmin go to that database and import the SQL file.

    Edit the wp-config file and be sure to change the database name, user, and password. I would double check all of these. Also your prefix_ is probably different on the new host.
    {{ DiscussionBoard.errors[6219729].message }}
  • Profile picture of the author Didi
    @ckbank

    Yup, it has already passed 24 hrs and everything is fine now. Thank you for your kind reply.

    Didi
    {{ DiscussionBoard.errors[6219731].message }}
  • Profile picture of the author kochtgr
    Originally Posted by Didi View Post

    Hello Warriors,

    I kind of need your help guys. I've just transferred a Wordpress Blog to a new host and after uploading the files and database on the new server, I got this error,

    "Error establishing a database connection

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request."

    I did the editing of the username and password from within the wp-config.php file but the error is still showing.

    Can someone advice this newbie pertaining to this matter? Thanks in advance guys.


    Didi
    Why don't you ask your new hosting company? I suppose you have change the server names on your domain, right?
    {{ DiscussionBoard.errors[6219743].message }}
  • Profile picture of the author Didi
    @Dietriffic

    I managed to resolve the problem Thank you very much

    Didi
    {{ DiscussionBoard.errors[6219745].message }}
  • Profile picture of the author kochtgr
    Originally Posted by Didi View Post

    Hello Warriors,

    I kind of need your help guys. I've just transferred a Wordpress Blog to a new host and after uploading the files and database on the new server, I got this error,

    "Error establishing a database connection

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request."

    I did the editing of the username and password from within the wp-config.php file but the error is still showing.

    Can someone advice this newbie pertaining to this matter? Thanks in advance guys.


    Didi
    Why don't you ask your new hosting company?
    I suppose you have changed the server names on your domain, right?
    {{ DiscussionBoard.errors[6219757].message }}
  • Profile picture of the author Didi
    @DireStraits

    Yup, managed to solve it but your advice is a good one too. I will take note of that for future reference in case I run into trouble again. Thanks

    Didi
    {{ DiscussionBoard.errors[6219760].message }}
  • Profile picture of the author nbatioco
    I suggest to contact your hosting provider. They will help you fixed your database problem. In my own experience, I highly suggest for hostgator (dot) com. They have excellent customer support.

    P.S if you dont have any hosting account on hostgator use nbatiocohosting for 25% off for any purchases.
    {{ DiscussionBoard.errors[6219808].message }}
  • Profile picture of the author travlinguy
    Did you switch DNS server names from one host to the other? That might be the problem.
    {{ DiscussionBoard.errors[6220187].message }}
  • Profile picture of the author wmguild
    If you are using a cpanel host, you'll want to make sure you have added your user to the database in your control panel.

    If you are using a smaller hosting company, they may be able to help you as well. it's just smart business for them to keep you happy.

    Larry
    {{ DiscussionBoard.errors[6220225].message }}
  • Profile picture of the author sbucciarel
    Banned
    Here's a step by step pdf on how to transfer a Wordpress site that might help to identify what you did wrong
    http://domainingdiva.com/transfer.pdf
    {{ DiscussionBoard.errors[6220313].message }}
  • Profile picture of the author dv8domainsDotCom
    I would almost guarantee it is the 'host' setting in the wp-config.php file.
    Edit this file and modify:

    define('DB_HOST', 'somehostvalue');

    maintain single quotes (identifiers) and the semicolon at the end of the line. Your hosting provider must be able to provide you the correct value to use for the DB host. This is 'usually' just simply 'localhost' (if the DB is hosted same physical server as the webserver) but in some providers it is not. Your host company should be able to confirm the correct setting.
    Signature
    Support a Warrior, Save Money!
    Rock Bottom Prices on Domains and Website Hosting
    {{ DiscussionBoard.errors[6220525].message }}
  • Profile picture of the author dv8domainsDotCom
    seems my post disappeared heh... sorry if this is re-post.

    I would suggest editing the wp-config.php file.

    define('DB_HOST', 'somehostname');

    This tells wordpress "where" the database host is. Most of the time it is 'localhost', but your hosting provider should be able to provide you the correct value to use. Verify correct host, user and pass for the DB and should pick up just fine.
    Signature
    Support a Warrior, Save Money!
    Rock Bottom Prices on Domains and Website Hosting
    {{ DiscussionBoard.errors[6220564].message }}
  • Profile picture of the author dv8domainsDotCom
    Edit wp-config.php, modify the DB_HOST

    This will look like:

    define('DB_HOST', 'somehostname');

    Your current hosting provider should be able to give the correct hostname to use. This is usually just localhost, but can be different in some cases.
    Signature
    Support a Warrior, Save Money!
    Rock Bottom Prices on Domains and Website Hosting
    {{ DiscussionBoard.errors[6220577].message }}
  • Profile picture of the author goozleology
    That error means that WP cannot connect to the database because usually when you switch hosts, the prefixs to the database, username and password get changed.

    All you have to do is log into cpanel and then click on the My SQL Databases link and then link the databases and users (giving the user access to all privleges).

    Once you do all of that, open your wp-config file and edit the database name, username and password. Save and upload it. Refresh your page and everything should be good!
    {{ DiscussionBoard.errors[6220591].message }}
  • Profile picture of the author oda
    Hi mate,

    Go right back to the very start and go through the process gain checking all the details.
    It could a different path name for different hosts or if you moved into a subfolder or subdomain you may need to make a small change depending on how your hosting is set up.

    When I break something I just start again, unless I know exactly what went wrong. Its a pain but moving a blog should take about 5 minutes so your not losing a day or anything.

    Hope that helps mate

    Oda
    Signature
    Are You Missing Out on an Opportunity?
    AGED .COM Domains $37 Each or make offer from $9 Grab a Bargain HERE
    {{ DiscussionBoard.errors[6220841].message }}
  • Profile picture of the author alistair
    I take it you exported and then imported the old database to the new databse?

    Have you uploaded all of the relevant files as well?

    Is the blog still on the same domain or different domain name?
    {{ DiscussionBoard.errors[6220876].message }}
  • Profile picture of the author alistair
    Did you export the old database and then import to the new one, and is the blog still on the same domain or a different domain name?
    {{ DiscussionBoard.errors[6220886].message }}
  • Profile picture of the author sodevious
    Make sure your databases are correct! Your wp-config info should match the database you are using.
    {{ DiscussionBoard.errors[6220963].message }}
  • Profile picture of the author SamDermot
    Banned
    This is DataBase problem you can contact your web host and tell the problem they would fix it.
    {{ DiscussionBoard.errors[6220989].message }}
  • Profile picture of the author sirtiman
    Go to fiverr, fix that problems with trusted gig seller.
    {{ DiscussionBoard.errors[6221271].message }}
  • Profile picture of the author Alcon
    Have you contacted your customer support,

    Its seems as though this may be something that they could help you with much better than we can
    {{ DiscussionBoard.errors[6221280].message }}
  • Profile picture of the author FreeMeal
    Read this article from where it says "tweeking your database to make it function" and see if that helps. How to Move WordPress to a New Server or Host
    {{ DiscussionBoard.errors[6221285].message }}
  • Profile picture of the author Randall Magwood
    There's always the option of calling your old host and your new host for answers.
    {{ DiscussionBoard.errors[6221554].message }}
  • Profile picture of the author JayWiz
    This error meaning that you have error on your database configuration, this includes host, database name, username, and password. Make sure you have correct setting for this.

    1. Your host name. It's usually localhost but some hosting has its own separate host name.
    2. Your database name. Make sure you use correct database name in new server.
    3. Your username and password. Has you create username with all privileges allowed for your database?

    Edit wp-config.php based on your new setting.
    {{ DiscussionBoard.errors[6221710].message }}
  • Profile picture of the author slayer0x59
    Did you change the Nameserver 1 and 2?
    Signature

    SEO/Webmaster/WordPress/Drupal site builder

    http://www.onlinejobs.ph/jobseekers/info/30461

    {{ DiscussionBoard.errors[6221741].message }}
  • Profile picture of the author JayWiz
    It means there is wrong configuration for your database, this includes host, database name, username and password.

    1. Your host. Usually it's localhost but some host has different setting.
    2. Your database name. Make sure your database already created and it has correct name.
    3. Your username and password. Make sure you create username with all privileges access to your database.

    Edit wp-config.php based on those settings, be careful because even 1 mistake will cause errors.
    {{ DiscussionBoard.errors[6221769].message }}
  • is this message appearing?
    Signature
    Pick a product. Pick ANY product! -> 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    {{ DiscussionBoard.errors[6221889].message }}
  • Profile picture of the author JayWiz
    It means there is wrong configuration for your database, this includes host, database name, username and password.

    1. Your host. Usually it's localhost but some host has different setting.
    2. Your database name. Make sure your database already created and it has correct name.
    3. Your username and password. Make sure you create username with all privileges access to your database.

    Edit wp-config.php based on those settings, be careful because even 1 mistake will cause errors.
    {{ DiscussionBoard.errors[6221933].message }}
  • Profile picture of the author JayWiz
    Is this reply working? I am sorry if double post!

    It means there is wrong configuration for your database, this includes host, database name, username and password.

    1. Your host. Usually it's localhost but some host has different setting.
    2. Your database name. Make sure your database already created and it has correct name.
    3. Your username and password. Make sure you create username with all privileges access to your database.

    Edit wp-config.php based on those settings, be careful because even 1 mistake will cause errors.
    {{ DiscussionBoard.errors[6222014].message }}
  • Profile picture of the author IulianP
    Double check the database and the users you have.
    I had to create the users again when I transfered but apart that everything was fine.
    {{ DiscussionBoard.errors[6222448].message }}
  • Profile picture of the author shayman
    Just did a quick Google search. A few solutions here:
    WordPress › Support » Tags — Error establishing a database connection
    {{ DiscussionBoard.errors[6222748].message }}
  • Profile picture of the author Chris Thompson
    What were your exact steps to do this?

    I can help but I need details of specifically what you did.

    Can you access the dashboard via wp-admin?
    {{ DiscussionBoard.errors[6222848].message }}
    • Profile picture of the author Didi
      Originally Posted by Chris Thompson View Post

      What were your exact steps to do this?

      I can help but I need details of specifically what you did.

      Can you access the dashboard via wp-admin?
      Yes, I am able to.
      {{ DiscussionBoard.errors[6223378].message }}
  • Profile picture of the author Didi
    Hello Warriors,

    Thank you all for your kind and generous reply. The problem has been solved, mysteriously, the blog started to pop up and I don't know what caused it to have that "Database Connection Error". But here's the layout that I have done and please correct me if there's a mistake in the steps that I did. Here was what I did :

    1) I downloaded all the files of the blog via FileZilla and save it onto my hard drive.

    2) I export the database of the blog via Cpanel from my hosting account and save it onto my hard drive.

    3) Added the new domain onto the new server.

    4) Changed the nameservers of the domain, pointing them to the new servers.

    5) Transferred all files to the assigned location on the new server.

    6) Create the database on the new server, noting down the name, username and the password of the new database.

    7) Import the SQL file (the old database that I had exported to my hard drive) from within the database on the new server.

    8) Set the privileges; giving the user access to all privileges

    9) Edit the wp-config.php file; changing the name, username and the password that I had noted down when I created the new database on the new server and save.

    10) Upload the wp-config.php to the new server via FileZilla, replacing the file.

    That was the whole process of what I did. Please point out to me if there are any steps that I happened to miss out.

    By the way, in the early above post, "dv8domainsDotCom" did mention about the 'host' setting in the wp-config.php file. I think I will need to check this with the new host because normally, this would be "localhost" but he mentioned this is not the case in some hosting companies.

    Let me know if I have missed out anything in the above mentioned process and I thank you guys for helping me out.

    Didi
    {{ DiscussionBoard.errors[6223234].message }}

Trending Topics