Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am currently using rackspace cloudsites and my wordpress config is not connecting.

Here is the error:

PHP Parse error: syntax error, unexpected '!' in /mnt/stor7-wc1-dfw1/672237/www.site.com/web/content/wp-config.php on line 28

Line 28 seems to be the password field:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', ' 672207_wordpress');

/** MySQL database username */
define('DB_USER', '672207_wpusers');

/** MySQL database password */
define('DB_PASSWORD', ‘!Password’);

/** MySQL hostname */
share|improve this question

closed as off-topic by John Conde, Kevin B, M Khalid Junaid, scronide, andrewsi Apr 4 '14 at 0:11

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting." – John Conde, Kevin B, M Khalid Junaid, scronide, andrewsi
If this question can be reworded to fit the rules in the help center, please edit the question.

4  
You have wrong quotes ‘!Password’ change to '!Password' also please donot use the original credentials in your question –  M Khalid Junaid Apr 3 '14 at 20:31
    
i like how the syntax highlighting here makes it so much more obvious than it likely is in the editor being used. –  Kevin B Apr 3 '14 at 20:33

2 Answers 2

The parse error comes from using curly/smart quotes in ‘!Password’

Change it to '!Password'

They're beautiful, yet deadly.

This may have been caused by using a Word Processor such as Word or similar, or copied from a Website, or the type of quotes on your keyboard.

An IDE would have picked this up.


As stated by Kevin B in a comment, notice how the word "Password" shows up in light blue?

StackOverflow's syntax highlighting has done its job and was a sign.

share|improve this answer

use define('DB_PASSWORD', '!Password'); instead of define('DB_PASSWORD', ‘!Password’);

The correct code:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', ' 672207_wordpress');

/** MySQL database username */
define('DB_USER', '672207_wpusers');

/** MySQL database password */
define('DB_PASSWORD', '!Password');

/** MySQL hostname */
share|improve this answer
1  
When correcting someone's code you should also explain why it did not work, and why your correction does work. It may be obvious if you know what you are doing, but if they had to ask then it is probably not obvious to them. –  Sverri M. Olsen Apr 3 '14 at 20:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.