Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk10 min

How to Fix the WordPress “File Is Empty” Error on Media Uploads

Learn why WordPress says “File is empty” when a real file is selected, then follow a controlled diagnostic path through PHP limits, memory, uploads permissions, storage quotas, conflicts, logs, and MIME validation.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

WordPress shows “File is empty. Please upload something more substantial.” when the temporary upload it receives is zero bytes. The file on your computer may contain data, but PHP may have discarded the request, rejected its size, or been unable to write the temporary or final file. Check PHP upload limits first, then the uploads directory, storage quota, logs, software conflicts, and finally file-type validation. Change only the setting that the evidence identifies, then retry with a small controlled file.

What the “File is empty” error actually means

During a media upload, PHP creates a temporary file and passes it to WordPress. WordPress core checks whether that temporary file is larger than zero bytes. If it is not, the handler returns: “File is empty. Please upload something more substantial.” Core specifically associates this condition with uploads being disabled in php.ini or with post_max_size being smaller than upload_max_filesize.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Therefore, the message does not prove that your original image, video, or document is empty. It means WordPress could not read a non-zero-byte upload at the point where its handler ran. PHP can discard a request before WordPress reads it, and a server can fail to create or write the temporary file. A file-type restriction, storage quota, or plugin failure can also stop an upload, although those paths may produce a different message.

Identify the failure path before changing settings

Use the pattern of the failure to choose the smallest useful check. Test with a small, ordinary JPEG or PNG first, and note whether the request fails immediately or only after the progress indicator runs.

What you observe Most useful first check What it helps distinguish
Every file fails, including a tiny image PHP upload enablement, the runtime limits, and the writable uploads path A site-wide server or filesystem problem rather than a file-size problem
Small files work but larger files fail upload_max_filesize, post_max_size, and available quota Request-size or storage limits
The browser reports an HTTP or server error and the PHP log has no matching request Web-server and PHP request logs Rejection before WordPress receives the upload
The upload appears to finish but the file is missing from the Media Library Uploads-directory ownership, permissions, and the configured path A write or path problem after transfer
Only one extension or a group of uncommon extensions fails Detected MIME type and the account’s upload capability File-type validation rather than an empty request
The problem disappears when plugins are disabled or a default theme is active Reactivate components one at a time while watching the logs Software interference

Keep the original error, the filename and size, the time of the attempt, and the HTTP response. Those details let hosting support match the browser action to the exact PHP or web-server log entry.

1. Verify PHP upload and request-size limits

Confirm uploads are enabled

Dashboard media uploads are processed by PHP. If PHP’s file_uploads setting is disabled, WordPress cannot receive the file and the handler may see an empty temporary upload. Check the PHP configuration used by the web request, not merely the command-line PHP configuration. Hosting panels, a server’s PHP information page, or the host’s support team can show the active values.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set both size limits for the intended file

upload_max_filesize limits an individual uploaded file. post_max_size limits the complete HTTP request, which includes the multipart form and any other posted data. Set post_max_size at least as large as upload_max_filesize, and make sure both values accommodate the file you intend to upload. If the request limit is lower, PHP can discard the upload before WordPress can inspect it, even though the local file is valid.

After changing a value, confirm that the new value is active for the PHP handler serving the site. A command-line PHP version, a different PHP-FPM pool, or a different virtual host can use another configuration file. Restart or reload the relevant PHP service when your hosting arrangement requires it, then retry using a small file followed by the original file.

If you do not control php.ini, ask your provider to confirm file_uploads, upload_max_filesize, and post_max_size for the site’s web PHP process. Managed WordPress hosting is useful here because support can check the active pool and server logs rather than asking you to guess which configuration file is in use.

2. Check memory only after the request-size limits

Memory is a separate limit from upload size. WordPress documents a default WP_MEMORY_LIMIT of 40 MB and a default WP_MAX_MEMORY_LIMIT of 256 MB in its current Advanced Administration Handbook. The higher backend limit is particularly relevant when WordPress processes media or generates image sizes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not raise memory first when the symptom is a zero-byte request. More memory cannot make PHP accept a request rejected by post_max_size, and it cannot make a non-writable directory writable. Increase the applicable WordPress or PHP memory limit only when the PHP or web-server log shows memory exhaustion, or when the file reaches WordPress but image processing fails after transfer.

Any WordPress memory constant is still bounded by the PHP process’s own memory_limit and by limits imposed by your host. Make one change, repeat the same controlled upload, and record whether the log message changes. Remove an unnecessary override rather than leaving progressively larger values in place.

3. Verify the uploads path, ownership, and permissions

Find the directory WordPress is using

The normal destination is wp-content/uploads, usually organized into year and month subdirectories. A migrated site, custom configuration, or network installation may use another path. Confirm the actual path in the site configuration or the failing request’s log entry instead of assuming that the default is still in use.

Test write access as the web process

The PHP process must be able to create a temporary or final file in the uploads directory, and the directory must remain accessible so the uploaded asset can be served. Check that the directory exists, that its owner and group match the web-server/PHP account used by the site, and that parent directories allow traversal. Correct ownership is preferable to granting broad permissions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use the least-privilege permissions appropriate to your server. Setting the entire site or uploads tree to 777 is not a safe fix: WordPress warns that overly permissive settings can allow an attacker to upload or modify executable content. If permissions were changed during troubleshooting, restore the previous secure ownership and mode after the test.

A log entry such as a permission denial, failed temporary-file creation, or an unwritable directory points to this branch. Fix the specific owner or directory mode, then test again; do not change PHP limits to compensate for a filesystem error.

4. Check disk space and WordPress upload quotas

Even correct PHP limits cannot create a file when the server filesystem is full. Check free space on the volume containing the WordPress installation and the system’s temporary directory. Also check inode availability if the host exposes it; a volume can have apparent free space while being unable to create another file.

WordPress checks remaining upload space and can reject a file that exceeds the available quota. This is especially important on multisite, where the network can impose a site-specific upload quota in addition to the host’s disk limit. Compare the file size with the remaining quota, including room for generated image sizes and the temporary copy created during upload.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Freeing space, increasing the applicable quota, or asking the host to correct a disk allocation resolves this branch. A quota error is not repaired by changing WP_MEMORY_LIMIT or by making the uploads directory world-writable.

5. Isolate plugins, themes, PHP compatibility, and damaged core files

Use a controlled conflict test

Make the test during a maintenance window or on a staging copy when possible. Record the active plugins and theme first. Temporarily deactivate all plugins and switch to a default WordPress theme, then retry the same small file. If the upload works, reactivate plugins one at a time and repeat the test until the conflict returns. Restore the original theme after the test and leave the conflicting component inactive until it is updated or replaced.

If you cannot access the dashboard, use the recovery tools provided by your host or temporarily rename the plugins directory only if you understand how that affects the site. Preserve a backup and reverse the change immediately after isolating the cause.

Check PHP compatibility and core integrity

WordPress lists PHP incompatibility and corrupted core files among common causes of failures. Review the PHP version against the version supported by your WordPress release and active extensions. Inspect the PHP and web-server logs at the exact upload time for a fatal error, warning, or failed include. If the log points to core corruption, use WordPress’s supported core-repair or reinstallation process rather than replacing files at random, and keep wp-content and wp-config.php intact.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Logs should guide the change. A plugin stack trace calls for a plugin fix; a PHP compatibility error calls for a supported PHP version or an updated component; a core-file checksum problem calls for a core repair. Avoid disabling security controls or changing several unrelated settings at once, because that destroys the evidence needed to identify the failing request.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

6. Check MIME and file-type validation

After PHP has delivered a file, WordPress validates the detected MIME type. Unsupported types are blocked unless the account has the unfiltered_upload capability. Consequently, a file containing data can still fail as an upload because WordPress does not accept its detected type. This is a different path from a zero-byte temporary upload.

Test with a standard image type that the site already accepts. If only a particular extension fails, confirm the file’s real MIME type rather than trusting its filename, and check whether a security or media-management plugin is changing the allowed list. Do not grant unfiltered_upload broadly just to bypass a warning; it permits uploads outside the normal type restrictions and should be limited to trusted accounts under a deliberate security policy.

Read the logs before making a broad change

Check the PHP error log, PHP-FPM or equivalent process log, and the web-server error log for the timestamp of the failed request. Look for evidence of a request-size rejection, disabled uploads, permission denial, quota exhaustion, memory exhaustion, a fatal plugin error, or MIME validation failure. The browser’s developer tools can show the response status and response body, but the server log normally explains why the request was rejected.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If no PHP entry exists, the request may have been rejected by the web server, a proxy, or a hosting security layer before PHP ran. Give the host the exact time, URL path, account/site name, file size, and response status. If PHP logs a zero-byte temporary file while the local file is valid, verify upload enablement and request limits before investigating WordPress code.

A safe, minimal-change repair sequence

  1. Save the exact error, test-file size and type, timestamp, and browser response.
  2. Confirm that PHP uploads are enabled and that post_max_size is at least as large as upload_max_filesize.
  3. Retry with a small standard image, then with the original file, without changing any other setting.
  4. If the request reaches WordPress, verify the actual uploads path, web-process ownership, least-privilege permissions, free disk space, and any multisite quota.
  5. Use the PHP and web-server logs to decide whether memory, a plugin/theme, PHP compatibility, or damaged core files is involved.
  6. If only certain extensions fail, investigate MIME validation and the account’s upload capability.
  7. After the fix, restore secure permissions, reactivate components one at a time, and document the single change that resolved the upload.

When to contact your hosting provider

Contact the host when you cannot see the active web-PHP configuration, cannot change the PHP-FPM pool, lack access to server logs, or suspect a proxy or platform quota. Ask for the values and status of file_uploads, upload_max_filesize, post_max_size, PHP memory_limit, the temporary-directory status, filesystem free space, and any request-blocking rule. Include one failed timestamp and one successful or controlled test, if available. This gives support a reproducible request instead of a general report that “uploads do not work.”

Common mistakes that make the problem harder

  • Raising memory before checking request limits: memory does not repair a request discarded because it exceeds post_max_size.
  • Making everything writable: 777 can create a security exposure and hides the real ownership problem.
  • Changing many values simultaneously: you lose the ability to connect the successful retry to one cause.
  • Assuming the local file is the evidence: WordPress evaluates the temporary server-side upload, not the copy on your computer.
  • Ignoring quotas and logs: a full volume, multisite quota, or pre-PHP rejection follows a different repair path from a plugin conflict.

What a successful verification looks like

A proper fix produces a repeatable result: a small standard image uploads, appears in the Media Library, and can be served from the configured uploads path; the original file then succeeds when it fits the confirmed PHP limits and available quota. The relevant log no longer records the original failure, and no insecure permission or unnecessary capability override remains in place.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

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

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.