WordPress Troubleshooting & Fixes

How to Fix Images Not Uploading in WordPress

blog-post-banner

WordPress Troubleshooting & Fixes

How to Fix Images Not Uploading in WordPress

Are your images not uploading to the WordPress media library? Do you see errors like “HTTP error”, “File could not be uploaded”, “Sorry, this file type is not permitted”, or images uploading as blank thumbnails? This guide covers every cause and every fix to solve WordPress image upload problems permanently.

1

Common Reasons Why Image Upload Fails

Uploads usually fail due to permission, size, or server issues.

Most common causes include:

  • Wrong folder permissions (most common)
  • PHP memory limit too low
  • Wrong file permissions
  • Incorrect upload path in database
  • Security or firewall blocking uploads
  • Image too large (size or resolution)
  • File type not allowed
  • Corrupted .htaccess file
  • ModSecurity blocking requests
  • Cache or CDN conflicts

Let’s fix each one step-by-step.

2

Step 1: Fix Upload Folder Permissions (Most Common Fix)

Uploads fail if WordPress cannot write to upload directories.

Go to:

  • public_html/wp-content/uploads

Set permissions:

  • Folders: 755
  • Files: 644

Apply recursive permissions to all subfolders inside /uploads.

This alone fixes image upload issues in most cases.

3

Step 2: Increase WordPress Max Upload Size

Large images may fail with “HTTP error”.

Add this to .htaccess:


php_value upload_max_filesize 256M
php_value post_max_size 256M
php_value max_execution_time 300
php_value max_input_time 300
    

Or add in wp-config.php:


@ini_set( 'upload_max_size' , '256M' );
@ini_set( 'post_max_size', '256M');
@ini_set( 'memory_limit', '512M' );
    

Most hosts allow raising upload limits via control panel.

4

Step 3: Fix Incorrect Upload Path

If WordPress is saving images to a wrong folder, upload breaks.

Go to:

  • Settings → Media

Make sure no custom upload path is set.

If the field is editable (older WP versions), remove any custom path.

Correct path should be:

wp-content/uploads

5

Step 4: Disable Plugins Causing Upload Issues

Security, optimization, or image plugins often block uploads.

Temporarily disable:

  • LiteSpeed Cache
  • WP Rocket
  • Smush / Imagify / EWWW
  • Wordfence
  • All-In-One Security
  • ModSecurity (server-level)

After disabling, attempt uploading an image again.

If upload works → the plugin was blocking the request.

6

Step 5: Fix HTTP Error During Upload

HTTP error appears when WordPress cannot process the file.

Fix methods:

  • Increase PHP memory limit
  • Disable image optimization temporarily
  • Add this to .htaccess:

SetEnv MAGICK_THREAD_LIMIT 1
    

This fixes ImageMagick resource issues on many servers.

7

Step 6: Clear Browser Cache, CDN, and WordPress Cache

Old cached versions may show broken image previews.

  • Clear WordPress cache plugin
  • Clear Cloudflare cache
  • Purge CDN cache
  • Hard refresh browser (Ctrl + F5)

Sometimes the image is uploaded, but cached as missing.

8

Step 7: Fix File Ownership Issues (Linux/Cloud Hosting)

Apache or NGINX may not have permission to write files.

Run this command (SSH servers):


chown -R youruser:youruser public_html/
    

Then fix permissions again.

This is common on VPS / Cloud servers after migrations.

9

Step 8: Disable ModSecurity (Common on Shared Hosting)

ModSecurity may block image uploads as “unsafe”.

Ask your host to:

  • Disable ModSecurity temporarily
  • Whitelist upload rules
  • Exclude /wp-admin/ and /wp-content/uploads from scanning

This fixes sudden upload failures on many cPanel servers.

10

Step 9: Regenerate .htaccess File

Incorrect rewrite rules block media library functions.

Steps:

  1. Rename .htaccess → .htaccess-old
  2. Go to Settings → Permalinks → Save

A fresh .htaccess fixes many upload errors.

11

Step 10: Allow Additional File Types (If File Type Blocked)

WordPress blocks some formats by default.

Add in wp-config.php:


define('ALLOW_UNFILTERED_UPLOADS', true);
    

Or use a plugin:

  • File Upload Types by WPForms

Use carefully—unfiltered uploads can be unsafe.

Need a Fully Optimized WordPress Media System?

All SiteCrafted websites include optimized image upload settings, correct permissions, CDN configuration, compression tools, and fully secure upload directories.

Launch a Perfectly Configured Website

Sandeep Sangam

Sandeep Sangam

Author at SiteCrafted Web Solutions

Sandeep Sangam is the Founder of SiteCrafted Web Solutions and a WordPress expert specializing in high-performance business websites, SEO-ready templates, and conversion-focused designs. With years of experience helping small businesses and entrepreneurs build a strong online presence, he creates beginner-friendly WordPress tutorials that simplify complex concepts and make website building easy for everyone.

Through SiteCrafted, Sandeep has helped hundreds of clients launch beautiful, fast, and scalable WordPress websites without technical complexity. His mission is to provide practical guidance, ready-to-use solutions, and professional resources that empower users to build and grow their websites with confidence.

View all posts by Sandeep Sangam
author-avatar

About Sandeep Sangam

Sandeep Sangam is the Founder of SiteCrafted Web Solutions and a WordPress expert specializing in high-performance business websites, SEO-ready templates, and conversion-focused designs. With years of experience helping small businesses and entrepreneurs build a strong online presence, he creates beginner-friendly WordPress tutorials that simplify complex concepts and make website building easy for everyone.

Through SiteCrafted, Sandeep has helped hundreds of clients launch beautiful, fast, and scalable WordPress websites without technical complexity. His mission is to provide practical guidance, ready-to-use solutions, and professional resources that empower users to build and grow their websites with confidence.

Leave a Reply

Your email address will not be published. Required fields are marked *