3

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.

1

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.

-1

You're best bet is to update the URL: http://codex.wordpress.org/Changing_The_Site_URL

Try avoided editing anything directly in the database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.