WordPress – fixing wp_options array

You may have noticed that when transferring between your development and production environments, your finely-crafted WordPress site will completely break.

The fact that the url for the site has changed forces you to run a good old find-and-replace on the MySQL backup to swap all instances of the url ro fix all the links – however in certain themes the whole look of the site has broken.

This is to do with discrepancies in the length of the url, and the way in which serialised php arrays are stored.

The culprit is the array held in the themename.wp_options table. My example is below.



Leave a Reply

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