WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to simplify the installation and default settings of my theme, by creating a plugin that installs it (versus the traditional "Appearance > Install Themes" routine. Once installed, I want to be able to delete the plugin from the site, so there will be no dependencies on it after activation.

Is this possible?

I would include the theme.zip file inside the plugin.zip file so that it could easily be transferred up and over to the themes directory.

If possible, any examples of this would be helpful. Thanks in advance for your help.

share|improve this question
205 questions and 9 answers. That's a mighty imbalance. – anu Apr 12 '11 at 13:45

Why not set the default settings from within the theme? You can use the 'swith_theme' action.

To answer your question: yes, it's possible, but it requires that the user's setup allows moving files, which can lead to more headaches than covenience.

share|improve this answer
@scribu: Thanks, I was anticipating that response. In this case, I have a fallback for moving issues, This is my preferred install, then I have a fallback ready as in try/catch. – Scott B Mar 13 '11 at 5:48
@scribu: The main reason I want the plugin install is that it allows me to have a base theme package, then via individual plugins (each tuned with presets for different types of sites), I can create customized versions of the theme with one click, vs multiple configuration steps that are required in theme options. – Scott B Mar 13 '11 at 5:51
Unless those plugins provide some additional functionality, that still doesn't make much sense. Just have a welcome page in the theme, where you ask the user to choose the site's profile. – scribu Mar 13 '11 at 9:10
Or make child themes. – scribu Mar 13 '11 at 9:10
@scribu: where would you store your settings for the various site profiles? That might be something I'd consider, depending on complexity to the user. This is all about bulletproofing the setup for the end user. Give them any more than a 3 or 4 options and its like you are asking them to commit to marriage. – Scott B Mar 13 '11 at 9:31

Your Answer


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.