-1

PHP Parse error: syntax error, unexpected 'DB_USER' (T_STRING), expecting ',' or ')' in /public_html/wp-config.php on line 26

I've been given this error and don't know how to fix it? Could anyone advise? Thanks. I've been working on this for a while as I'm new to code and would really appreciate some help.

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

/** MySQL database username */
define('DB_USER', ‘user’);

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

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8mb4');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
Daniel
  • 2,621
  • 2
  • 18
  • 34
Becky
  • 7
  • 2

1 Answers1

-1

you are using two different types of single quotes. the ones around localhost (') are fine, the ones around user (‘) are not. It should work as follows:

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

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

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

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8mb4');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
calm
  • 363
  • 2
  • 9