How to Fix Image Upload Issue in WordPress (Step by Step)

Having trouble uploading images in WordPress? We‘ve all been there! Don‘t worry, you‘re not alone. Many users run into frustrating errors like "Unable to create directory" or "The uploaded file could not be moved."

The good news is this is a fairly easy fix you can tackle yourself. In this guide, I‘ll walk you through how to resolve image upload issues in WordPress step-by-step.

What Causes Image Upload Problems in WordPress?

The main culprit behind image upload errors is incorrect file permissions on your web server.

To understand why, we need to first cover how file permissions work. Your server uses a system called CHMOD to control permissions. CHMOD assigns a numeric code like 755 or 644 to files and folders.

This code represents the access level for the file owner, group, and public. 755 means the owner has full access, the group has limited access, and public has read-only access.

WordPress requires certain CHMOD values to be set properly. This allows it to smoothly read, write, and move files around your server as needed.

Often, web hosts inadvertently change permissions during server upgrades. Even if your site was working fine before, a tweak to permissions behind the scenes can suddenly block image uploads in WordPress.

According to WordPress support forums, image upload issues due to file permission problems are among the most common troubleshooting topics from users.

The telltale sign is getting errors when trying to upload images, such as:

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

"The uploaded file could not be moved to wp-content/uploads/"

You may also notice images disappearing from your media library.

Step-By-Step Guide to Updating File Permissions

The good news is you can fix this by updating the file permissions through an FTP client. Let‘s get started fixing it:

1. Connect to your site‘s files via FTP.

You‘ll want to use an FTP client like FileZilla that allows easily editing permissions. Login to your web host account and connect to your site‘s file directory.

2. Navigate to the /wp-content/uploads/ folder.

This is where WordPress stores all uploaded images, so it‘s crucial we set permissions here correctly.

3. Right click on the uploads folder and select "File Permissions."

A dialog box will open allowing you to view and modify permissions.

4. For folders, enter "755" in the value box and check "Recurse into subdirectories."

This recursively applies the 755 CHMOD code to the uploads folder and all subfolders.

5. Click "Apply to directories only."

This ensures you are only changing folder permissions at this stage, not files.

6. For files, enter “644” in the value box and check “Recurse into subdirectories.”

The 644 code gives files the proper permission.

7. Click "Apply to files only."

Now you’re only modifying files, not folders.

8. Click OK to apply the permission changes.

That‘s it! The FTP client will automatically update the permissions on all files and folders under uploads to align with WordPress requirements.

Try uploading an image in WordPress again to test it out. You may need to tweak the folder permission to 744 or 775 if 755 does not work perfectly.

Also test any file upload forms or functionality you have on your site. Permission issues can affect those as well.

If you are unfamiliar with using an FTP client, contact your web host‘s support team. They can guide you through updating permissions via their file manager.

Recap and Additional Resources

To quickly recap, the key steps to resolve image upload issues are:

  • Connect to your WordPress site‘s files via FTP
  • Navigate to the uploads folder
  • Update folder permissions to 755 recursively
  • Update file permissions to 644 recursively

I hope this guide helped you quickly squash image upload problems! Please feel free to reach out if you have any other questions. I‘m always happy to help troubleshoot.

For more information, here are some WordPress resources on working with file permissions:

Let me know if this guide helped you get your WordPress image uploads working again! I‘d love to connect and hear if you have any other website issues I can help with.

Written by Jason Striegel

C/C++, Java, Python, Linux developer for 18 years, A-Tech enthusiast love to share some useful tech hacks.