Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

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.

share|improve this answer
    
+1 for Bainternet's reply –  Ashfame Mar 15 '11 at 7:19
    
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 '11 at 4:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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