How To Create An “Uploads” Folder And Make It “Writable”

How To Create An “Uploads” Folder And Make It “Writable”

About This Lesson

If you manually installed WordPress, to be able to upload images and other media to your site you’ll need to create an “uploads” folder and make it “writable”.

If you don’t do this, you’ll get the following error message when you try and upload an image or any other media, (See the image below for an example of this.)

“image.JPG” has failed to upload due to an error

Unable to create directory wp-content/uploads/2014/04. Is its parent directory writable by the server?

Unable To Create Directory

(The message you receive will show a different file name and date, but it’s the same problem).

This lesson will show you how to create an “uploads” folder and how to make it “writable”.

Prerequisites

Because you’re going to be creating a folder on your server, you’ll need to know what FileZilla is and how it works, see my FileZilla tutorial.

Action Steps

To create an “Uploads” folder and make it “Writable” there are four main steps you need to take,

1) Create the uploads folder

2) Temporarily set the file permissions to 777

3) Successfully upload an image in WordPress

4) Set the file permissions to 755

Read All About It

Before We Begin

To begin with, you’ll need to connect to where your WordPress files are being hosted, using the program FileZilla. (If you don’t know what FileZilla is, or how to use it, see my tutorial here).

Login To Filezilla

Step 1/4 – Create The Uploads Folder

Once you’re connected to your site in FileZilla, you’ll need to create the uploads folder.

To do this,

Create The Uploads Folder

  1. In FileZilla navigate to where on your site your WordPress files are and then go into wp-content
  2. Then right click and choose “Create directory”
  3. Give it the name of uploads

Step 2/4 – Temporarily Set The File Permissions To 777

Then you need to temporarily set the file permissions of the uploads folder to 777.

This gives WordPress the permission it needs to add media to the uploads folder and also allows WordPress to create two initial folders that you’ll need.

To set the file permissions,

Temporary Set The File Permissions To 777

  1. Right click on the uploads folder and go to “file permissions”
  2. Where it says “Numeric value”, put 777

By the end of this process you’ll need to change this from 777 to 755, but I’ll remind you of that in step 4 below.

(If you want to learn more about file permissions, visit WordPress.org).

Step 3/4 – Successfully Upload An Image In WordPress

Now you need to login to your WordPress site and upload an image.

To do this, in the navigation menu go to Media > Add New.

Then select an image on your computer and drag it into the box within WordPress that says, “Drop files here”. (Like in the image below). This will then upload the image to your WordPress site.

Upload An Image In WordPress

Then go back into FileZilla and go into the uploads folder. (Like in the image below).

Check Uploads Folder

  1. You should now have a folder with the current year
  2. Open that and you should have a folder with the current month. Within that folder is the image you just uploaded.
  3. If not, hit the refresh button

(This is assuming you’ve ticked the option within the media settings to, “Organize my uploads into month- and year-based folders”. Which I recommend you do.)

Step 4/4 – Set The File Permissions To 755

Finally you need to change the folder permission of the “uploads” folder, so it’s 755.

We only needed to temporarily set it to 777, while we uploaded our first image.

This was to get WordPress to create the initial year and month folders for us. Now that we’ve done that, WordPress will know how to create the folders for every month/year going forward.

However you don’t want to keep the permissions at 777, as this could potentially be a security risk.

To change the permissions,

Set The File Permissions To 755

  1. In FileZilla, backup until you get to the wp-content folder
  2. Right click on the uploads folder and go to “file permissions”
  3. Where it says “Numeric value”, put 755

All Done

And that’s it for this lesson. WordPress is now setup so you can upload images or any other media to your site.

If you’re interested in more tutorials like this, check out my individual tutorials page.