Switched Hosting providers, now lost Wordpress Blog (More details in post)

Hi all,

Ive switched hosting providers in the past couple of days, and obviously because a database connection had been set up on the old host, there was no connection to a database when I imported all static html files and the like plus all wordpress core files etc over onto the new server.

What Ive currently done to try and get my blog page to work:

1.Export the .sql file from the phpmyadmin off the old hosts server onto my desktop.
2.Create a new database name/user account and password with access granted to all privileges on the MySQL page on the new hosts server.
3.Amend the current wp-config.php file, so that the new database name/username/password with the new host is matching.
WP.CONFIG details amended are as follows:
a./** The name of the database for WordPress /
b./
* MySQL database username /
c./
* MySQL database password */
Go to the myphpadmin page on the new hosts server and seeing the new database name now created on the left hand side of the screen click it, and then under the import tab at the top of the screen, browse to the desktop to select the .sql file and upload.
Screen now displays a message saying:
“Import has been successfully finished, 327 queries executed. (MySQL Server.sql)”

4.Next test is the live site, so I go to http://www.bfdesigns.co.uk/blog/index.php and hey presto I get the error message stating:

“Error establishing a database connection”

All my wordpress files are structurally identical as they came off my old host, so Im at a complete loss what to look at or turn to next ?

I must stress my knowledge with php and or MySQL is non-existant, so Im literally trying to follow pages like the wordpress codex page: how to move wordpress over to another server, and many other web pages alike.

Any help on this would be greatly appreciated as I quite literally have pushed my technical boundaries on this one. (Have been at it for a good 10 hours over 2 days now)

Thanks as always

Ben

I’m no expert, but I would have used the same username and password on the new database. Maybe you could try a new database with those settings?

Are you sure you used the right database name? The host server usually gives it some kind of prefix, followed by an underscore, and then the name you selected.

Hey Ralph,

I managed to fix the issue yesterday afternoon but have been busy with several clients, so apologies for not replying back any sooner.

The issue was with the MySQL hostname which my hosting provider had not provided me, so after submitting a support ticket and getting a reply 2.5 hours later! I was emailed with this information, and after updating this in the wp-config.php file…hey presto the connection was made and my blog was live again :slight_smile:

I have a couple more issues one with this site and one with a site I have just built so will post these in there appropriate forum holes…

Glad you got it sorted! Thanks for posting back. :slight_smile: