WordPress error: Unable to create directory uploads. Is its parent directory writable by the server?

The dreaded error:

Unable to create directory uploads. Is its parent directory writable by the server?

I’ve got my hands wrapped around my head and telling myself “how to fix this, how to fix this, how to fix this…”. After a few moments of self talk, some disillusionment and finally over to Google search landed me on a couple of sites that had given supposedly clear solutions. But, you know what even Google has lost it’s touch and provides search results that are so old it’s just not funny anymore.

Anyway, after more thought and thinking and people writing about changing directory permissions to 771 and then some even went far as 777.

Although it’s not the devils number it sure is close enough for any would be sinister hacker to come right through and help themselves.

Improper File Paths

The problem with this type of “directory uploads” has got to do with having proper paths in the settings.

It Silently Happened While Moving WordPress Sites

This week I’ve been working on moving 50 sites from one server to another. It was all done manually and without having access to SSH. I moved some websites across into the same cpanel account and thus the original uploads directory contained a path that was now totally irrelevant to the new uploads directory.

Because of the way I move WordPress sites across to another server – I fully restored the database directly into MySQL using MysqlAdmin application in Cpanel without altering any settings. Hence, the old server settings got transferred to the new server and keeping old server paths which begot this error come alive.

I did not realise it at the time that the error was there waiting to show itself at the right moment (a few moments ago). I should have thought of this while I was recreating the database and the wordpress on the new server. However, WordPress continued to work without a problem until I tried to add a new theme to the site. It then gave me this error. The error also comes up if you try to upload a media file etc. If you have a plugin that does downloads to the site then that also will not work correctly and until you remove the problem.

How to fix the “Unable to create directory uploads. Is its parent directory writable by the server?” error.

To come to the point after that rant here is the simple solution to fixing this error:

Log into your wordpress dashboard and head over to your Settings –> Media page.

On this page you will find an entry for the uploads directory “if it is set”. Otherwise it will not appear if everything is working fine.

It’s a weird problem and I’ve come across this a few times in the past.

If there is a setting for the uploads directory or path then simple erase it and save the settings.

Let us know below in the comments section if this fixed your problem.

That’s all, cheers!

How to exclude a sub-folder from WordPress control?

How to exclude a sub-folder from WordPress control?

Here is a quick fix for those who have come across this problem and looking for a solution to stop WordPress from redirecting.

If you have WordPress website with a sub folder that needs to be outside the control of WordPress then this little fix will get rid of your headache.

This requires editing the .htaccess file either from your ftp account/cpanel or via the WordPress dashboard with admin login. If you don’t know how to edit your .htaccess file from within your WordPress then search for plugins that allow you to edit this file.

It is a simple change and most websites have already a default .htaccess file.
Within the htaccess file locate the following code:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Change the following line from this

RewriteRule . /index.php [L]

To

RewriteRule ./ /index.php [L]

and that is pretty much all you need to do. It was a life saver for me.
I wanted to use this so that I can password protect a private use folder.
I use this particular folder to store personal documents that I can view from any place or computer and I need to provide valid user login details.
If you’re using CPANEL you can set this up in the “Directory Privacy” icon.

Have a great day!