venerdì 7 gennaio 2011

wordpress da locale in remoto

Ci possono essere problemi nel trasferire in remoto un database locale per word press.
Io ho utilizzato questa tecnica:

in locale ho esportato il database in sql
quindi l'ho aperto con un editor (anche wordpad)
quindi ho cercato e sostituito tutti i http://localhost/etc con http://miosito.xx

poi sono andato in remoto
ho creato un database
quindi ho importato il file sql.

Ovviamente c'è da modificare il file wp_config.php .

Nel file config oltre a cambiare percorsi del data base è bene aggiungere le seguenti righe:

//**aggiunta**//
define('WP_SITEURL', 'http://miosito.xx');

define('WP_HOME', 'http://www.miosito.xx');

define('WP_MEMORY_LIMIT', '64M');
//**FINE aggiunta**//

absolute path

E' possibile ricavare l'absolute path creando una pagina prova.php con il seguente codice:

$path = getcwd ();
echo "il tuo absolute path è il seguente: ";
echo $path;
?>