WordPress and DigitalOcean – theme install failed. Unable to create directory

Written by Sam

On May 24, 2017

After performing a recent website migration to a DigitalOcean Droplet I experienced a weird error…

I’d just finished the cloning and everything looked to have gone smoothly. Everything was in it’s place, all loading and functioning correctly, and with the wizardry of DigitalOcean’s servers it was running like Usain Bolt – fast!

So… clone done, dev site working well, it’s time to change the theme and get to work. Only it didn’t quite happen like that.

As per normal I jumped into Appearance > Themes and started to upload my favourite WordPress theme. It all went well for about 5 seconds before loading the standard WordPress error screen, resplendent in off-white, and succinctly informing me that the theme install had failed because WordPress was ‘unable to create the directory’.


I poked around, I Googled answers, I logged into the console and ran some commands, changed some folder permissions, and I tried using my site manager software to push the theme in – nothing worked.

Then I found a suggestion online that was so simple there seemed impossible it would work. But it did.

The problem had occurred because I had cloned the site from another server, and the solution was ridiculously easy. I had the wrong file path in my Media folder settings.

SOLUTION: In WordPress Admin I went to Settings > Media and checked the path. It was completely wrong, so I reset it to wp-content/uploads. Retried my theme install and…it worked!

You may also be interested in…

Maintaining your WordPress site

Maintaining your WordPress site

Do you find it hard to stay on top of your website requirements; Wordpress updates, theme updates, plugin updates, spam, etc etc? Have you ever run a little update, and then realised something went wrong. Maybe it's a plugin conflict? Maybe a hosting issue? Maybe your...

Divi Text Module loses formatting

Divi Text Module loses formatting

Over the last wee while we've come across a small issue with Divi and some hosting providers that can create a massive headache.The issue is that, after saving a page, all of the line breaks are removed from Text Modules (the <p> and <br> HTML tags are...