Upgrading a custom theme through the Dashboard

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.