Forum Replies Created

Viewing 1 replies (of 1 total)
  • In fact there is a way ! In your wp-config.php, replace these lines ( 19 – 28 ) :

    /** The name of the database for WordPress */
    define(‘DB_NAME’, ‘wp-premierTemplate’);

    /** MySQL database username */
    define(‘DB_USER’, ‘root’);

    /** MySQL database password */
    define(‘DB_PASSWORD’, ”);

    /** MySQL hostname */
    define(‘DB_HOST’, ‘localhost’);

    By these lines :

    $local = false;
    if ( stristr($_SERVER[‘HTTP_HOST’], ‘local’) ||
    substr($_SERVER[‘HTTP_HOST’], 0, 7) == ‘192.168’)
    {
    $local = true;
    }

    // Sélectionne les informations de connexion à la BD
    // selon l’environnement d’exécution
    if ($local)
    {
    define(‘DB_NAME’, ‘your_bd_name’); /** The name of the database for WordPress */
    define(‘DB_USER’, ‘root’); /** MySQL database username */
    define(‘DB_PASSWORD’, ”); /** MySQL database password */
    define(‘DB_HOST’, ‘localhost’); /** MySQL hostname */
    }
    else
    {
    $bd_server = ‘your_server’;
    $bd_username = ‘your_username’;
    $bd_password = ‘your_password’;
    $bd_name = ‘your_bd_name’;
    }

    This will check out if you are in local or not !

Viewing 1 replies (of 1 total)