Title: Parse error when editing wp-config.php
Last modified: August 21, 2016

---

# Parse error when editing wp-config.php

 *  [hofda](https://wordpress.org/support/users/hofda/)
 * (@hofda)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/parse-error-when-editing-wp-configphp/)
 * I have followed the pdf guide point for point, but when I try loging in as admin
   after having added databases and changed the lines in dbsettings.php and wp-config.
   php, I get the following error when trying to access the site:
 * Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/*/public_html/
   websitename.com/wp-config.php on line 36
 * When I remove the string ‘require( ‘db­settings.php’ ); ‘ the site works again,
   but of course, I cannot continue following the pdf guide without this line. I
   can’t code to save my life, so I am sure there is some silly reason this doesn’t
   work for me, but please tell a silly man what he is doing wrong 🙂
 * Regards
    Hans-Kristian
 * [https://wordpress.org/plugins/shardb/](https://wordpress.org/plugins/shardb/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * (@wpmuguru)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/parse-error-when-editing-wp-configphp/#post-4846194)
 * Check that the quotes around db-settings.php are the single quote character next
   to your enter/return key.
 *  Plugin Author [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * (@wpmuguru)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/parse-error-when-editing-wp-configphp/#post-4846195)
 * > I am sure there is some silly reason this doesn’t work for me, but please tell
   > a silly man what he is doing wrong 🙂
 * Sometimes web browsers convert quotation marks into encoded quotation marks when
   you paste text.
 *  Thread Starter [hofda](https://wordpress.org/support/users/hofda/)
 * (@hofda)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/parse-error-when-editing-wp-configphp/#post-4846209)
 * OK, I had put in the line wrong. Now it looks like this:
 * define(‘DB_COLLATE’, require( ‘db­settings.php’ ));
 * I get a new error, but this time it looks to be about the dbsettings.php file,
   not the wp-config.php file.
 * Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/hofda/
   public_html/classicxrated.com/dbsettings.php on line 15
 * If I read it correctly, there is something wrong on line 15, I think thats where
   the database prefix is located, but I might count wrong (do you count lines with
   nothing in them?).
 *  Thread Starter [hofda](https://wordpress.org/support/users/hofda/)
 * (@hofda)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/parse-error-when-editing-wp-configphp/#post-4846210)
 * By the way, the line looks like this:
    $shardb_prefix = ‘hofda_’;
 *  Plugin Author [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * (@wpmuguru)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/parse-error-when-editing-wp-configphp/#post-4846216)
 * > define(‘DB_COLLATE’, require( ‘db­settings.php’ ));
 * That’s not what the guide instructs you to do. Change that line back to the way
   it was. You are supposed to add the following line after all of the `define( '
   DB_*` lines:
 * `require( 'db-settings.php');`
 * It should be on its own line with no text.
 *  Thread Starter [hofda](https://wordpress.org/support/users/hofda/)
 * (@hofda)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/parse-error-when-editing-wp-configphp/#post-4846217)
 * Putting them on different lines was what I did first, and there were no double
   quotations there when I checked. So back to square one.
 * Now it looks like this in wp-config.php:
 * define(‘DB_COLLATE’, ”);
    require( ‘dbsettings.php’);
 * I get the same error I began with.
 *  Thread Starter [hofda](https://wordpress.org/support/users/hofda/)
 * (@hofda)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/parse-error-when-editing-wp-configphp/#post-4846218)
 * Sorry, when I upload to my FTP server, it doesn’t seem to take right away. I 
   now get the same error I got last instead; Parse error: syntax error, unexpected
   T_CONSTANT_ENCAPSED_STRING in /home/hofda/public_html/classicxrated.com/dbsettings.
   php on line 15
 * Not sure why I got error on line 35 in wp-config the first time, as I can swear
   I was setting it the same way I have now.
 *  Plugin Author [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * (@wpmuguru)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/parse-error-when-editing-wp-configphp/#post-4846228)
 * You likely have the same quote problem. The text of the message is the same a
   in your original post.
 *  Thread Starter [hofda](https://wordpress.org/support/users/hofda/)
 * (@hofda)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/parse-error-when-editing-wp-configphp/#post-4846229)
 * The problem is I can’t see a quote (“) anywhere on line 15, only single ‘ in 
   front and behind the database prefix name. Am I misundertanding you?
 * Below is line 14-16:
 * $shardb_hash_length = 1;
    $shardb_prefix = ‘hofda_’; $shardb_dataset = ‘mb’;
 *  Plugin Author [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * (@wpmuguru)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/parse-error-when-editing-wp-configphp/#post-4846244)
 * By quote I mean either a single quote or a double quote. Both lines 15 & 16 have
   single quotes.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Parse error when editing wp-config.php’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/shardb.svg)
 * [SharDB](https://wordpress.org/plugins/shardb/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shardb/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shardb/)
 * [Active Topics](https://wordpress.org/support/plugin/shardb/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shardb/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shardb/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/parse-error-when-editing-wp-configphp/#post-4846244)
 * Status: not resolved