There was a problem loading the comments.

WordPress media upload fails (HTTP error / failed to write file / unable to create directory) — GARMTECH fix

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

If WordPress cannot upload images or files, you may see messages like:

  • HTTP error
  • Unable to create directory wp-content/uploads
  • Failed to write file to disk
  • The uploaded file exceeds the upload_max_filesize directive

On GARMTECH Hosting these issues are usually caused by permissions, lack of disk space/quota, or PHP upload limits.

Step 1 — Check hosting disk space / quota

  • In Plesk, check your subscription/disk usage (or the plan limits).
  • If disk space is full, delete old backups/logs or unused files, then retry the upload.

Step 2 — Verify the uploads folder exists

  1. Open Plesk → your domain → Files.
  2. Go to httpdocs/wp-content/.
  3. Make sure the folder uploads exists.

If it does not exist, create it: wp-content/uploads.

Step 3 — Fix permissions (do not use 777)

WordPress needs write access to wp-content/uploads.

  • Recommended permissions on shared hosting are usually 755 for folders and 644 for files.

In Plesk File Manager:

  1. Select the uploads folder.
  2. Choose Change Permissions.
  3. Set permissions to 755, apply to subfolders if needed.

Step 4 — Increase PHP upload limits (if the file is large)

  1. In Plesk open PHP Settings for the domain.
  2. Increase (within your plan limits):
  • upload_max_filesize
  • post_max_size (must be larger than upload_max_filesize)
  • memory_limit
  • max_execution_time (for slow connections or large processing)

Step 5 — Check WordPress image processing and plugins

  • Temporarily disable security/caching plugins and try again.
  • If the issue happens only with specific file types, a security rule may be blocking them.

Step 6 — Review logs for the exact error

  • In Plesk, open Logs for the domain and retry the upload to capture the error.
  • Also check WordPress Site Health and any plugin logs.

Common quick fixes

  • Rename the file to remove special characters (use photo-01.jpg instead of spaces/symbols).
  • Try a smaller file to see if it’s a size/limit issue.
  • Update WordPress core/plugins/themes if they are outdated.

Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  

Tags

© GARMTECH