Non-local database installation: ERROR
-
Hi, I’m new to WP, and I am trying to figure out an installation where I have WP files on serverA, but my database is on serverB. I got an error connecting to the database. Here is the sample config file below. My questions are:
1. Do I leave the apostrophe’s within the code when replacing the dbname? define(‘DB_NAME’, ‘putyourdbnamehere’);
Would I write the following?
define(‘DB_NAME’, ‘sari_db’);2. For ‘DB_HOST’, do I put ‘http://www.website.com’, or just ‘www.website.com’? I actually tried both, and they both failed. WP does support databases that aren’t local, right?
<?php
// ** MySQL settings ** //
define(‘DB_NAME’, ‘putyourdbnamehere’); // The name of the database
define(‘DB_USER’, ‘usernamehere’); // Your MySQL username
define(‘DB_PASSWORD’, ‘yourpasswordhere’); // …and password
define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value
define(‘DB_CHARSET’, ‘utf8’);
define(‘DB_COLLATE’, ”);// You can have multiple installations in one database if you give each a unique prefix
$table_prefix = ‘wp_’; // Only numbers, letters, and underscores please!// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-content/languages.
// For example, install de.mo to wp-content/languages and set WPLANG to ‘de’
// to enable German language support.
define (‘WPLANG’, ”);/* That’s all, stop editing! Happy blogging. */
define(‘ABSPATH’, dirname(__FILE__).’/’);
require_once(ABSPATH.’wp-settings.php’);
?>
- The topic ‘Non-local database installation: ERROR’ is closed to new replies.