[Fast Error] Anrop till odefinierad funktion wp() i wp-blog-header.php

O fel som dök upp för mig på flera bloggar WordPress efter att de flyttats från en server till en annan och hade redigerade filen wp-config.php. "Call to undefined function wp() in wp-blog-header.php".

Orsak till fel: – Det verkar som att filen wp-config.php den tappar sina rader efter att ha redigerats. Specifikt visas all php-kod på en enda rad. Jag vet inte vad den exakta orsaken är. Förmodligen ett problem med php-filredigeraren.

[Fast Error] Call to undefined function wp() in wp-blog-header.php

Lösning: Kopiera och ersätt till en ny fil wp-config.php där du ställer in din databas, användardatabas, pass och prefix.

<?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'); 
?>

Felet försvann efter denna uppdatering i filen wp-config.php al WordPress.

Brinner för teknik, skriver jag med glädje på StealthSettings.com sedan 2006. Jag har lång erfarenhet av operativsystem: macOS, Windows şi Linux, men också i programmeringsspråk och bloggplattformar (WordPress) och för nätbutiker (WooCommerce, Magento, PrestaShop).

Hur man » WordPress » [Fast Error] Anrop till odefinierad funktion wp() i wp-blog-header.php
Lämna en kommentar