Support » Installing WordPress » Error installing WP: unexpected 'DB_HOST' (T_STRING)

  • Resolved RTalal


    When trying to install a fresh WP, I get:
    Parse error: syntax error, unexpected ‘DB_HOST’ (T_STRING) in /home/basic/public_html/w1/wp-config.php on line 16

    16 define(‘DB_HOST’, ‘localhost’);

    Anyone has any idea what is this?
    I have other installations on the same server using the same “define(‘DB_HOST’, ‘localhost’);” without problems.

Viewing 7 replies - 1 through 7 (of 7 total)
  • did you modified the file at all? how are you installing WP?

    You seem to have introduced an error into your wp-config.php file – possibly around line 15 (PHP get a little hazy with the correct line numbers sometimes).

    yes i modified it to enter db name, db user, password; but not db_host!

    I installed wp this way:
    download, uncompress, ftp-upload contents of wordpress folder to a subfolder, with the modified wp-config.php, then running:
    www. mydomain. com/ subfolder/wp-admin/install.php

    Then I got the error.

    Delete your wp-config.php file and let WordPress re-create it as part of the install process.

    I uploaded a fresh copy of wp-config.php and re-edited it.
    Install Successful!

    Thank you for your comments.

    do not forget to mark the thread as solved !

    OK but I need to investigate a little bit. If i found nothing of benefit to others, I’ll mark it solved.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Error installing WP: unexpected 'DB_HOST' (T_STRING)’ is closed to new replies.