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.