[תוקן Error] קריאה לפונקציה הבלתי מוגדרת wp() ב-wp-blog-header.php

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.

כחובב טכנולוגיה, אני כותב בשמחה ב- StealthSettings.com מאז 2006. יש לי ניסיון עשיר במערכות הפעלה: macOS, Windows, ו- Linux, וגם בשפות תכנות ופלטפורמות בלוגינג (WordPress) ולסוחרת אלקטרונית (WooCommerce, Magento, PrestaShop).

איך » WordPress » [תוקן Error] קריאה לפונקציה הבלתי מוגדרת wp() ב-wp-blog-header.php
השאירו תגובה