普通网友 2015-01-19 20:18
浏览 52

解析错误:wp-config.php中的意外DB_USER T_STRING

I'm copying a website to a different domain name on the same server - which is something I usually don't do. I copied the public_html using FileZilla and created a new database (and uploaded the old database in this new database) using the same username and password as the original database. I changed the new database name in the wp-config.php file but now I keep on getting the following error:

Parse error: syntax error, unexpected 'DB_USER' (T_STRING) in /home/username/website/public_html/wp-config.php on line 22

My wp-config file is the following:

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

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

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

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

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

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

I filled in the database name correctly. I didn't change the password and username as they are the same as in the previous database.

Who knows what's wrong?

Thank you!

  • 写回答

3条回答 默认 最新

  • dongzouxigu12345 2015-01-19 20:20
    关注

    The error is here:

    define('DB_NAME', 'database’);
    

    The last tick (just after database) should be a single quote (') instead of a back tick (`).

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度