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 can't seem to upgrade my custom theme. Whenever I try to uploaded a new package, all I get is:

Unpacking the package…
Installing the theme…
Destination folder already exists. /wp-content/themes/THEMENAME/
Theme install failed.

I've searched and all I can find is people recommending upgrading over FTP. Sadly, I don't have FTP access right now, but also using FTP appears to be a dirty solution. I can obviously delete and re-install the theme, but that seems very dirty, too.

How can I update a theme through the Dashboard?

share|improve this question
    
What's with the downvote? –  Django Reinhardt Mar 27 '13 at 12:08
    
What you are trying to do and what you are requesting are both horrendously bad practice, and should never be done. Though it wasn't me that downvoted –  Tom J Nowell Mar 27 '13 at 12:26
    
@TomJNowell Then what's the Good Practice way of upgrading a theme? I'm all ears! –  Django Reinhardt Mar 27 '13 at 12:34
    
"...what's the Good Practice way of upgrading a theme?"-- My opinion... FTP. I wouldn't consider that a "dirty" solution and it is the only way I ever update a production server. –  s_ha_dum Mar 27 '13 at 13:34
1  
Tom - Why is that bad practice? Without an explanation, your response seems to fall into opinion. –  Ray Mitchell Mar 27 '13 at 14:11
add comment

1 Answer

up vote 4 down vote accepted

It fails because there is already a theme with that name on the server.

So the obvious solution is to remove the theme before you upload the new version.

If you're wanting to use an update mechanism like the theme repo, but on a custom theme, there are udpater classes you can add, such as this one:

https://github.com/UCF/Theme-Updater

That particular one uses github as its source, but there are various alternatives that use other sources

A few notes for anyone else with similar issues, pitfalls of using the backend to install and manage code:

  • Doing this is incredibly bad practice
  • If your host won't give you FTP access, your host must be pretty awful. I strongly recommend you switch providers.
  • You should not be able to add or install plugins via the dashboard, this indicates those folders are writable and is a massive security risk
  • If you have made a mistake in your theme ( it happens to the best of us ) and the functions.php has a syntax error etc, your site will be dead. You won't be able to login via the backend to edit the files or upload a new version or switch to a working theme.

Similar if not identical issues apply to plugins also.

share|improve this answer
    
Tom, could you please elaborate on the ability to add plugins via the dashboard? I guess it's something almost everyone does. –  RRikesh Mar 27 '13 at 12:30
    
@rrikesh you can add new plugins via the add new link in the admin menu, and either search for or install, but everything I mentioned for themes applies to plugins too, although its a tiny bit safer with plugins because you can just rename the plugins folder if everything goes wrong to get your dashboard back –  Tom J Nowell Mar 27 '13 at 12:59
    
@TomJNowell I think you misunderstand my question. Obviously I can delete the theme and re-upload it, but this is a pretty horrible way to go about things. I'm looking for a Good Practice way of updating a theme through the Dashboard, like TwentyTen has, without altering the Core, obv. Plug-ins and themes have the ability to update, don't they? –  Django Reinhardt Mar 27 '13 at 13:07
    
Oooh, those work via the theme repository, you mean something like this? github.com/UCF/Theme-Updater –  Tom J Nowell Mar 27 '13 at 13:12
    
@TomJNowell Yes! That's exactly what I'm looking for. Thanks! (Although I'm surprised and saddened that this functionality isn't part of WordPress by default! Weird.) You should update your answer. Thanks. –  Django Reinhardt Mar 27 '13 at 13:22
show 5 more comments

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.