2 つの異なる Web ホスト ( pagodabox& 、どちらも無料) があり、MySQL で000webhostをセットアップしました。localhost
3つすべてにワードプレスをインストールしましたが、それらは独自のドメイン内で完全に正常に動作します-つまり. localhostwordpressがlocalhostデータベースpagodaboxを使用している場合、データベースpagodaboxを使用している場合など。
ただしwp-config.php、たとえば、localhostワードプレスをデータベースに接続するためにデータベース アクセス資格情報を から変更すると000webhost、機能しません: "Error establishing database".
私が使用するそれぞれの資格情報は次のとおりです。
<?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');
?>
