[固定的 Error] 调用 wp-blog-header.php 中的未定义函数 wp()

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.

作为科技爱好者,我从2006年开始在StealthSettings.com上愉快地撰写文章。我在操作系统方面有丰富的经验,包括macOS、Windows和Linux,还熟悉编程语言和博客平台(WordPress),以及在线商店平台(WooCommerce、Magento、PrestaShop)。

如何以 » WordPress » [固定的 Error] 调用 wp-blog-header.php 中的未定义函数 wp()
发表评论