• Resolved mlotorocks

    (@mlotorocks)


    Hi,
    the site was just moved to a new host, old host was running a version of PHP 5.
    The new host is running PHP 7.3

    The wordpress install is in a subdirectory “redesign2019”

    Before the move, everything fine but after get the error establishing database connection.

    I have ensured that the database user, pass and name are correct.

    in the index.php file in the root I have this that previously worked on the old server:

    require( dirname( __FILE__ ) . ‘/redesign2019/wp-blog-header.php’ );

    but now gives the error.

    if I change to
    require( dirname( __FILE__ ) . ‘redesign2019/wp-blog-header.php’ );

    or

    require( dirname( __FILE__ ) . ‘../redesign2019/wp-blog-header.php’ );

    I get the white screen of death.
    I’m just guessing it has something to do with the PHP version. Any help would be awesome, thanks in advance!

Viewing 1 replies (of 1 total)
  • Thread Starter mlotorocks

    (@mlotorocks)

    Nevermind.
    Just in case anyone else finds this useful:

    in my database, the wp_options table needed to be repaired. Once that was done the site came back up.

Viewing 1 replies (of 1 total)
  • The topic ‘Error establishing database connection – PHP 7 and subdirectory install issue’ is closed to new replies.