Skip to content
DnsLister Forum

Where domain hunters compare notes

did a wordpress migration at 11pm and forgot serialised data exists

Twelve years of doing this and I still managed it. Moved a site to a new box on friday night, dumped the db, imported it, then ran a plain SQL find and replace on the old domain because I was tired and wp-cli felt like too many keystrokes. Homepage loaded fine. The customiser settings, the widget areas and every theme option were gone, because half of that lives in serialised arrays and a raw replace leaves the string length byte wrong, so php throws the array away rather than guess.

Restored the db and did it properly with wp search-replace, which understands serialisation, takes about nine seconds and would have saved me two hours. The annoying part is I have a note about exactly this in my own runbook. The bit that gets you in a wordpress site migration isnt the files and it isnt the dns, its the stuff that looks fine on the homepage until somebody opens the theme options a fortnight later and

Source: r/WordPressToolkit · by /u/rubenriis

Leave a Reply

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