[Fisso Error] Chiamata alla funzione non definita wp() in wp-blog-header.php

O errore che mi è apparso su diversi blog WordPress dopo che sono stati spostati da un server all'altro e avevano modificato il file wp-config.php. "Call to undefined function wp() in wp-blog-header.php".

A causa di un errore: – Sembra che il file wp-config.php perde le sue righe dopo essere stato modificato. Nello specifico, tutto il codice php appare su un'unica riga. Non so quale sia la causa esatta. Probabilmente un problema con l'editor di file php.

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

soluzione: Copia e sostituisci in un nuovo file wp-config.php in cui impostare il proprio database, database utenti, pass e prefisso.

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

L'errore è scomparso dopo questo aggiornamento nel file wp-config.php al WordPress.

Appassionato di tecnologia, scrivo con piacere su StealthSettings.com dal 2006. Ho un'ampia esperienza nei sistemi operativi: macOS, Windows e Linux, nonché nei linguaggi di programmazione e nelle piattaforme di blogging (WordPress) e per i negozi online (WooCommerce, Magento, PrestaShop).

Come » WordPress » [Fisso Error] Chiamata alla funzione non definita wp() in wp-blog-header.php
Lascia un tuo commento