Website URL
Error Message
mysqli_real_connect(): (HY000/2002): Connection timed out
Error establishing a database connection.
The database has been successfully imported and phpMyAdmin can access the database, but WordPress/PHP cannot connect to the MySQL server.
MySQL host: sql303.infinityfree.com
Database: if0_43014825_heatgo
MySQL user: if0_43014825
Other Information
I migrated my WordPress website from LocalWP to InfinityFree.
The WordPress files have been uploaded to /htdocs and the database SQL file was successfully imported into the InfinityFree database. phpMyAdmin shows the WordPress tables.
I have also checked wp-config.php and confirmed the database name, username, password and hostname.
The PHP error specifically says: “Connection timed out”.
Please check whether there is an issue with PHP connections to the SQL303 MySQL server.