O ความผิดพลาด ซึ่งปรากฏแก่ข้าพเจ้าในหลายบล็อก WordPress หลังจากที่พวกเขาถูกย้ายจากเซิร์ฟเวอร์หนึ่งไปอีกเซิร์ฟเวอร์หนึ่งและมี แก้ไขไฟล์ wp-config.php. "Call to undefined function wp() in wp-blog-header.php"
สาเหตุของการเกิดข้อผิดพลาด – ดูเหมือนว่าไฟล์ WP-config.php มันสูญเสียบรรทัดหลังจากได้รับการแก้ไข โดยเฉพาะอย่างยิ่ง โค้ด php ทั้งหมดจะปรากฏในบรรทัดเดียว ฉันไม่รู้ว่าสาเหตุที่แท้จริงคืออะไร น่าจะเป็นปัญหาตัวแก้ไขไฟล์ php
[แก้ไขแล้ว Error] Call to undefined function wp() in wp-blog-header.php
ทางออก: คัดลอกและแทนที่เป็นไฟล์ใหม่ wp-config.php
ในการตั้งค่าฐานข้อมูลของคุณ ฐานข้อมูลผู้ใช้ รหัสผ่าน และคำนำหน้า
<?php
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'putyourdbnamehere');
/** MySQL database username */
define('DB_USER', 'usernamehere');
/** MySQL database password */
define('DB_PASSWORD', 'yourpasswordhere');
/** 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', '');
define('AUTH_KEY', 'put your unique phrase here');
define('SECURE_AUTH_KEY', 'put your unique phrase here');
define('LOGGED_IN_KEY', 'put your unique phrase here');
define('NONCE_KEY', 'put your unique phrase here');
$table_prefix = 'wp_';
define ('WPLANG', '');
/* That's all, stop editing! Happy blogging. */
/** WordPress absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
?>
ข้อผิดพลาดหายไปหลังจากการอัพเดตนี้ในไฟล์ wp-config.php
al WordPress.