Ecco alcune query che ci possono aiutare durante la migrazione di worpress. In questo modo possiamo trovare tutti i link all’interno di post, pagine, immagini ed aggiornarli con il nuovo domino.

Abbiamo bisogno di accedere al database SQL, per farlo comunemente i provider mettono a disposizione il phpmyadmin.

Prima di eseguire ogni operazione è opportuno effettuare un backup del database. Se utilizzi phpmyadmin selezione il database dell’installazione wordpress e vai nella voce esporta. Seleziona “Salva come File” e “zip”

Once you are ready to do the find replace, you can enter your SQL statements in the “SQL” tab of phpmyadmin. Here is the syntax for a find replace in mySQL:

update TABLE_NAME set FIELD_NAME =
replace(FIELD_NAME, 'find this string', 'replace found string with this string');

In wordpress, to search the content of all posts and pages, you would use the table wp_posts and the field post_content:

update wp_posts set post_content =
replace(post_content, 'find this string', 'replace found string with this string');

Source: http://blinktag.com/how-to-find-replace-in-mysql-for-wordpress-permalinks-that-have-changed/

This page has been readed 7544 times

Leave a Reply

Your email address will not be published. Required fields are marked *