I'm writing a plugin and want to have a feature where, in the Admin area, the user will click on a link and it will download a theme to the /themes directory on their server. How would I do this?


  • 1
    Are these private themes? Or themes hosted on wordpress.org? If the latter, WordPress already supports installing themes over HTTP. – TheDeadMedic Mar 16 '11 at 23:53
  • That was just an example. Just creating some local plugins to help myself with development. I figured it out using fopen/fread/etc. – GavinR Mar 21 '11 at 19:00

Ehm... You are writing the plugin or thinking about it? Could you show us some stuff that you already did? You should check the permissions on the server where you want to upload the files. Then - in case - change chmod, upload and then change chmod back for sec. reasons. Maybe the update class will help you a little further.

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.