Unable to Upload Files into WordPress on Localhost – OS X Apache

Came across a very weird bug in WordPress 3.7.1, which was not letting me upload any image/file through the Media Uploader. It was constantly giving the following error:

  • I tried changing folder permissions to 777; error.
  • Tried changing folder owner to _www; error.
  • Tried changing folder group to _www; error.

None of these solutions worked.

I have a custom folder structure, where wp-content has been renamed to content. So I turned to wp-config.php file. This is how it looks like in my wp-config.php:

I tried changing the last line back to /wp-content/uploads (and renamed the folder), but still the same error! I was pulling my hair at this point!

Then I don’t know what occurred to me, and I commented out that last line. And voila! It worked!

Now I have no clue why explicitly defining the uploads folder was causing the issue, whereas on the WordPress Codex that’s exactly how the uploads folder – on a custom path – is supposed to be defined. Anyway, if anyone is having this issue in WordPress 3.7.x (or other versions), simply try removing this line from your wp-config.php file:

That’s all folks.


Leave a Reply

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