Forums

Installing on Localhost (8 posts)

  1. TheNetherlands
    Member
    Posted 4 years ago #

    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'); //

  2. moshu
    Member
    Posted 4 years ago #

    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'); //

  3. TheNetherlands
    Member
    Posted 4 years ago #

    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

  4. moshu
    Member
    Posted 4 years ago #

    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.

  5. TheNetherlands
    Member
    Posted 4 years ago #

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

  6. moshu
    Member
    Posted 4 years ago #

    What old file?

  7. Beel
    Member
    Posted 4 years ago #

    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.

  8. mickelsn1
    Member
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic