I have 2 different webhost (pagodabox
& 000webhost
, both free) and I've set up a localhost
with MySQL.
I've installed wordpress on all three of them which work perfectly fine within their own domain -- ie. when localhost
wordpress is using localhost
database, pagodabox
is using pagodabox
database and so on.
However if I change database access credentials from wp-config.php
in order to, say, make localhost
wordpress connect to 000webhost
database, it doesn't work: "Error establishing database"
.
Here's the respective credentials I use:
<?php
wp-config.php - relevant differences
* members.000webhost.com/panel/Manage MySQL Databases
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', '--------_db');
/** MySQL database username */
define('DB_USER', '--------');
/** MySQL database password */
define('DB_PASSWORD', '--------');
/** MySQL hostname */
define('DB_HOST', 'mysq--.000webhost.com');
* tunnel.pagodabox.com
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', '--------_db');
/** MySQL database username */
define('DB_USER', '--------');
/** MySQL database password */
define('DB_PASSWORD', '--------');
/** MySQL hostname */
define('DB_HOST', 'tunnel.pagodabox.com');
* localhost
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', '--------_db');
/** MySQL database username */
define('DB_USER', '--------');
/** MySQL database password */
define('DB_PASSWORD', '--------');
/** MySQL hostname */
define('DB_HOST', 'localhost');
?>