I’ve noticed a problem that pops up occasionally when moving a WP install from one place to another (usually the same server.)

I copy all the files to their new location, get a mysql dump, update all references to the old paths in the sql file, then import it to the new database.

Everything always works just fine apart from custom settings that have been added using register_setting. I can still see them in the database, but WP completely ignores them, and they need to be added again in the backend.

Is there something obvious I’m overlooking here? I can post up the code I’m using to build the custom settings panels if necessary…

Cheers.

2 s
2

Mostly a dupe: Why is my database import losing text widget data?

Doing a search and replace on an sql dump breaks URLs in the serialized data of widgets and theme options. See the link above for better ways to change URLs when moving WP sites.

Use Database Search and Replace Script in PHP | interconnect/it to find/replace in the database via correctly serializing data.

Leave a Reply

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