• Resolved richie01

    (@richie01)


    So I am trying to move a site from localhost and i can not get WP to connect to the database.

    I have /testconnection.php working just fine, so 100% it is not the credentials. I also then tried an entirely new install of wordpress to see if that was the issue and again it throws “error connecting to database” after going through the installation pages and putting in the correct DB and username etc.

    The server also has plenty of space and ram available so it does not seem to be peformance.

    I am completly stumped as to why WP has an issue. Apparently there is other WP sites running on the same physical server so the server setup should be good to go.

    Maybe there is something I am missing? I am just copying the wordpress files to the server.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Is it a clean database or the one from localhost?

    Thread Starter richie01

    (@richie01)

    The database is from local host but I also tried a brand new clean install and had the same issue.

    Thread Starter richie01

    (@richie01)

    New install, new database, new user:

    Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.

    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?
    If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

    Thread Starter richie01

    (@richie01)

    cPanel Version 68.0 (build 23)
    Apache Version 2.4.29
    PHP Version 5.6.32
    MySQL Version 5.6.38
    Architecture x86_64
    Operating System linux
    Path to Sendmail /usr/sbin/sendmail
    Path to Perl /usr/bin/perl
    Perl Version 5.16.3
    Kernel Version 3.10.0-714.10.2.lve1.4.65.el7.x86_64

    Thread Starter richie01

    (@richie01)

    Ok so although 127.0.0.1 was not working before and localhost was now 127.0.0.1 works and localhost does not. Perhaps server issue solved itself.

    • This reply was modified 6 years, 9 months ago by richie01.

    Perhaps.

    Thread Starter richie01

    (@richie01)

    All I know is it is really strange but its all working now. I get the feeling it was a server issue as my config was double checked and triple checked and the site was only recently re-enabled from a private server.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WordPress DB connection testconnection successful’ is closed to new replies.