• I am trying to do a local install

    I installed MAMP because I am on a Mac.

    I follow the directions fine up to this point

    I open the wp-config-sample.php file

    I edit the file to add the details from the database

    <?php
    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘wordpress’); // The name of the database
    define(‘DB_USER’, ‘root’); // Your MySQL username
    define(‘DB_PASSWORD’, ‘root’); // …and password
    define(‘DB_HOST’, ‘localhost:8889’); // 99% chance you won’t need to change this value
    define(‘DB_CHARSET’, ‘utf8’);
    define(‘DB_COLLATE’, ”);

    The tutorial I was following had localhost:8889 but I also found tutorials that said just to leave it as localhost. And of course the sample config file says most of the time you don’t need to change it.

    I did it both ways and I still get an error message when I try to then save the file as wp-config.php

    Mac Error code 8754, one or more characters were encountered that cannot be represented in the desired text encoding. I only changed the DB name, username, password, and db host. I changed absolutely nothing else. I tried localhost instead of with the :8889 in case the : was not allowed. It didn’t make any difference.

  • The topic ‘editing wp-config-sample.php for local install’ is closed to new replies.