Riparare WordPress quando viene cambiato il suo url
Posted on Maggio 19, 2006
Filed Under mysql, php, programmazione, wordpress tips | Visited 102 Times |
Penso sia capitato a tutti i wordpress users di dover spostare un blog da una cartella ad un’altra o da un dominio ad un’altro… Spesso wordpress si arrabbia un tantino nontrovando il css, le immagini e non permettendo la modifica dell’url dalle opzioni segnalando l’errore “enable sending referrers” descritto qui - http://codex.wordpress.org/Enable_Sending_Referrers
Per correggere velocemente il problema ecco cosa ho trovato nel sito principale di wordpress - http://codex.wordpress.org/Login_Trouble -
Basta inserire sotto i require la riga:
update_option(’siteurl’, dirname(’http://’ . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) );
nel file wp-login.php
Site URL Redirecting
In certain cases your WordPress address URI may have been reset.
- Check the siteurl value in the wp-options table of your WordPress database. A guide to doing this is available here (http://www.tamba2.org.uk/wordpress/site-url/).
- Is it set as http:/?
- If it is, change site_url to the correct value.
- Open wp-login.php in a text-editor and comment or delete the following lines:
// If someone has moved WordPress let’s try to detect it
//if ( dirname(’http://’ . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_settings(’siteurl’) )
// update_option(’siteurl’, dirname(’http://’ . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) );
Comments
Leave a Reply












