Title: Cannot Locate PHP Parse/Syntax Error.
Last modified: August 21, 2016

---

# Cannot Locate PHP Parse/Syntax Error.

 *  Resolved [oliver826](https://wordpress.org/support/users/oliver826/)
 * (@oliver826)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/)
 * Hi, I received the following error message:
 * > Parse error: syntax error, unexpected T_STRING in /home/content/84/10742684/
   > html/indynjtl/wp-config.php on line 18.
 * The site is down and I can only access it via FTP or through the file manager
   on my web server. I don’t know where to find the file/folder to access this code
   and fix it. Thank you in advance.

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/page/2/?output_format=md)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/#post-4355190)
 * What is in lines 16 – 20 of your wp-config.php file?
 *  Thread Starter [oliver826](https://wordpress.org/support/users/oliver826/)
 * (@oliver826)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/#post-4355194)
 * These are lines 16 – 20 in the wp-config.php file.
    // ** MySQL settings – You
   can get this info from your web host ** // /** The name of the database for WordPress*/
   define(‘DB_NAME’, ‘indxxxx’);
 * /** MySQL database username */
    define(‘DB_USER’, ‘_[redacted]_‘);
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/#post-4355200)
 * Change your database password now! Never, **ever**, post sensitive information
   on a public forum.
 *  Thread Starter [oliver826](https://wordpress.org/support/users/oliver826/)
 * (@oliver826)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/#post-4355204)
 * I didn’t. Those are not the real numbers. Sorry for any confusion.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/#post-4355207)
 * I can’t see anything wrong with the snippet above. Can you post lines 10 – 16?
 *  Thread Starter [oliver826](https://wordpress.org/support/users/oliver826/)
 * (@oliver826)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/#post-4355209)
 * These are lines 9 – 16, so you can see the entire sentence.
    * This file is used
   by the wp-config.php creation script during the * installation. You don’t have
   to use the web site, you can just copy this file * to “wp-config.php” and fill
   in the values. * * [@package](https://wordpress.org/support/users/package/) WordPress*/
 * // ** MySQL settings – You can get this info from your web host ** //
 *  Thread Starter [oliver826](https://wordpress.org/support/users/oliver826/)
 * (@oliver826)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/#post-4355226)
 * I uninstalled WP (except for the WP-content folders/files) and then re-installed,
   and I uninstalled/re-installed the plugins. One plugin (301 redirect) seems to
   be the possible cause of this error. The error message occurred after I deactivated/
   deleted this plugin and refreshed the cache. Might be grasping at straws here,
   but am trying to offer more information for a possible solution.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/#post-4355230)
 * Has the error disappeared since deactivating the plugin?
 *  Thread Starter [oliver826](https://wordpress.org/support/users/oliver826/)
 * (@oliver826)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/#post-4355234)
 * No. The error message is the only thing I get when trying to sign-in through 
   the admin screen or when looking at the site in a browser. Site URL is [http://indynjtl.org](http://indynjtl.org).
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/#post-4355237)
 * Can you recreate a fresh wp-config.php file using wp-config-sample.php as a template?
 *  Thread Starter [oliver826](https://wordpress.org/support/users/oliver826/)
 * (@oliver826)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/#post-4355257)
 * Okay, that might be the solution. I did this, and I now have an error that states:
   **
   Error establishing a database connection.** That looks promising. I did not include
   the keys/salts that were in the original wp-config.php file. Do I need to add
   those back? Otherwise, I can go through and just ensure that I don’t have any
   typos in the data.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/#post-4355258)
 * > Do I need to add those back?
 * I’d get a new set from [https://api.wordpress.org/secret-key/1.1/salt/](https://api.wordpress.org/secret-key/1.1/salt/)
 *  Thread Starter [oliver826](https://wordpress.org/support/users/oliver826/)
 * (@oliver826)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/#post-4355265)
 * Well, no error messages, but the website is completely blank – white screen only.
   I did add the new set of salts/keys from your suggested link above. I will try
   without once and see what happens.
 *  Thread Starter [oliver826](https://wordpress.org/support/users/oliver826/)
 * (@oliver826)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/#post-4355266)
 * Ah, success. I was able to access the admin page, and I’m now back in business.
   Thank you esmi for your assistance and your patience in helping me with this 
   problem. Always a learning experience with WordPress and PHP.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/#post-4355292)
 * Glad I could help 🙂

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/page/2/?output_format=md)

The topic ‘Cannot Locate PHP Parse/Syntax Error.’ is closed to new replies.

## Tags

 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 17 replies
 * 3 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-locate-php-parsesyntax-error/page/2/#post-4355317)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
