• Trying to get the weblog running on localhost but can’t figure out how to get the wp-config.php right.
    Name of the DB = news

    got this but doesn’t run.

    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘wordpress’); // news
    define(‘DB_USER’, ‘username’); // root
    define(‘DB_PASSWORD’, ‘password’); //
    define(‘DB_HOST’, ‘localhost’); //

Viewing 7 replies - 1 through 7 (of 7 total)
  • If the name of DB is “news” then:
    / ** MySQL settings ** //
    define('DB_NAME', 'news'); //
    define('DB_USER', 'root'); //
    define('DB_PASSWORD', '*****'); //
    define('DB_HOST', 'localhost'); //

    Thread Starter thenetherlands

    (@thenetherlands)

    Done it but it gives me the following error:

    Parse error: parse error in C:\Program Files\xampp\htdocs\news\wp-config.php on line 2

    Probably you messed it up during your trials. I’d delete the file and take the sample-config file as it is untouched(!), save it as config and do NOT change anything else, just put the DB name and username and pw as I showed above.

    Thread Starter thenetherlands

    (@thenetherlands)

    Could it be becouse I didn’t delete the old file after I renamed it and saved it?

    What old file?

    No, not if you renamed it. Moshu is likely correct, there is an error in your config file that needs to be fixed. Whether your set-up runs correctly after the error is fixed, well, that is another story.

    I had similar errors on my actual web host. If I recall, the problem was editing the file with pico; for some reason, it was inserting newlines into the comments after the DB variables. When I corrected this, the “blanks” error went away. If the suggestion of carefully modifying the default wp-config_sample.php file doesn’t work, I’d do a very careful cut-and-paste of the PHP code into a new wp-config.php file and delete all comments and extraneous newlines. Using a text editor that shows newline markings (kinda like Word’s “Show/Hide Para” function) might also help you find the problem.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Installing on Localhost’ is closed to new replies.