• Hi all,

    Ive changed hosting providers in the last couple of days, and my wordpress blog off my static site no longer works, and just produces an error on screen reading:
    “Error establishing a database connection”.
    Now I still have all the core wordpress files and all my own custom child theme template files, basically I havnt touched any of the files since I moved my site across.
    I was wondering in this particular scenario, what is the best way to go about getting WordPress working again, and restablishing a database connection, when one was already previously made ?
    I look forward to hearing from anybody.
    Ben

Viewing 4 replies - 1 through 4 (of 4 total)
  • did you adjust the database values in wp-config.php to reflect new host’s db?

    Thread Starter benisjamin

    (@benisjamin)

    If I start right from the beginning:
    I exported the the database files out of my old server via their phpmyadmin screen, I then created a new database and user account on the new server and used those details to modify the wp-config.php that I`d downloaded from the old server.
    Im still getting the error show up at :
    https://www.bfdesigns.co.uk/blog/wp-admin/

    Do I modify all the following in the wp-config file ?:

    /** The name of the database for WordPress */
    /** MySQL database username */
    /** MySQL database password */
    /** MySQL hostname */

    Do I modify all the following in the wp-config file ?:

    /** The name of the database for WordPress */
    /** MySQL database username */
    /** MySQL database password */
    /** MySQL hostname */

    yes that’s what you would modify and from the error something is wrong with one of those

    Thread Starter benisjamin

    (@benisjamin)

    I have checked and double checked and all the details match to the charactor.

    In the .sql file is there anything I should ammend as this is the top section as exported to my desktop(Should anything in this code now match the new database name/username/password Ive just created through the MySQL page in cpanel):

    — phpMyAdmin SQL Dump
    — version 2.9.2-Debian-1.one.com1
    https://www.phpmyadmin.net

    — Host: MySQL Server
    — Generation Time: Oct 13, 2011 at 10:04 AM
    — Server version: 5.0.51
    — PHP Version: 5.2.0-8+etch16

    — Database: bfdesigns_co_uk

    CREATE DATABASE bfdesigns_co_uk DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
    USE bfdesigns_co_uk;

    — ——————————————————–

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Changed hosting Providers then WordPress stopped working’ is closed to new replies.