Error establishing database connection – PHP 7 and subdirectory install issue
-
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.3The 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!
The topic ‘Error establishing database connection – PHP 7 and subdirectory install issue’ is closed to new replies.