0

I'm considering building a plugin which can export and import a site's custom options settings.

On export, it simply pulls all of the custom options from wp_options and create a zip file of them (perhaps as a csv or xml). On import, it would take the zipped data file and extract it into the site's wp_options table.

I'm sure this is not as easy as it sounds? What are some of the potential challenges?

That's option #1. Option #2 would be quite a bit more controlled in that it would only export those options which were prefixed with "my_" for example. In that way, I'd be only grabbing the options that I know are my custom options.

Any ideas or thoughts?

The next logical step would be to essentially create a clone file of the site, with all plugins, themes, posts, pages, tags, comments, categories, etc...

This clone file could be imported into an empty site, thus creating a baseline site in seconds.

1 Answer 1

1

One great challenge that i can think of is creating that your import export system dynamic in a way that if you add another option here and there in your updates that you won't have to go back to the export function and update it to export the new options as well, basically what I'm trying to say is have it automatically export all of your plugins options. The import part would be easier to implement after you read the dumped file if you dump it in a "key|value" format so just loop through it and imports all of the option,you wont need to edit that each time you add an option. So mainly make it easy to update in changes and updates you make.

1
  • Thanks Bainternet. I appreciate your feedback on that. The name/value pair data format is one of the options I've been considering, along with a few others.
    – Scott B
    Mar 16, 2011 at 4:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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