WordPress.org

Forums

[resolved] Error installing WP: unexpected 'DB_HOST' (T_STRING) (8 posts)

  1. RTalal
    Member
    Posted 1 year ago #

    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.

  2. dim
    Member
    Posted 1 year ago #

    did you modified the file at all? how are you installing WP?

  3. esmi
    Forum Moderator
    Posted 1 year ago #

    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).

  4. RTalal
    Member
    Posted 1 year ago #

    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.

  5. esmi
    Forum Moderator
    Posted 1 year ago #

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

  6. RTalal
    Member
    Posted 1 year ago #

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

    Thank you for your comments.

  7. dim
    Member
    Posted 1 year ago #

    do not forget to mark the thread as solved !

  8. RTalal
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.