Support » Fixing WordPress » Can't upload photos in recently moved 3.8 site

  • Resolved chriscob


    I recently moved a WordPress site to a new shared host account at inmotion and thought everything was ok until my client tried to upload a photo and got this error:
    filename.jpg” has failed to upload due to an error Unable to create directory uploads/2014/01. Is its parent directory writable by the server?
    I went to the file manager in cpanel and changed permissions for the uploads folder and the 2014 folder to 777, but it had no effect. I checked with the inmotion online chat support guys who normally solve all my problems, but they said it must be a WordPress problem. I searched here and found a few similar problems but no solutions other than changing the permissions, which didn’t work for me.

    Can anyone help?

Viewing 15 replies - 1 through 15 (of 16 total)
  • It sounds like you might have some ownership issues to work out, but try temporarily changing permissions on the wp-content folder, and see if that makes any difference.

    Just tried it, and it didn’t help. Should I change it back? It feels kind of dangerous to have that folder wide open.

    Every folder from Content to uploads to 2014 to 01 is set to 777 and the error still happens.

    Also, how would I “work out ownership issues?”

    Yes, you should change it back.

    Also, how would I “work out ownership issues?”

    General information/explanation:
    Permission Scheme for WordPress

    For specific info, your hosts FAQ docs and or support staff should be able to guide you in determining file and directory permissions for your particular environment. They may also be able to assist in determining why the files in a shared environment aren’t writable by the user account that should own them.

    That article seems to me to be a bit (putting it mildly) over the head of someone like me who just uses WordPress, and isn’t a developer. Do I understand you correctly that you are saying this isn’t a WordPress problem but an environment problem that I will have to resolve myself?

    Do I understand you correctly that you are saying this isn’t a WordPress problem but an environment problem…

    In a nutshell, probably.

    While anything is possible, it seems likely that a file ownership or permissions issue is preventing the account that WordPress is running as from writing files and directories.

    …that I will have to resolve myself?

    I wouldn’t think so. InMotion Hosting has an entire “WordPress Education Channel” that deals specifically with WordPress topics and tutorials. I should think they would be willing to field a few basic questions and provide some guidance.

    Just an afterthought here, but did you happen to install WordPress on that account using a Softaculous install script?

    No I didn’t use softaculous. I followed Inmotion’s tutorial which instructed me to set up the add-on domain, copy the files from the old host, use phpmyadmin to export the database from the old host and import it into a new database on the new host, change the wpconfig file, and then change my pc host file to make sure everything looked ok before changing the nameservers. I did all of that, but it never occurred to me that if everything else looked ok, including the ability to edit pages, that adding images would be completely inoperable.

    I have had a long online chat with inmotion support earlier tonight and it was recommended that I submit a support ticket so they could investigate further because the online chat guy didn’t know what the problem was. I’m waiting to hear back about my support ticket, but thought I would check here as well. I just did a search here and see quite a few other people have problems with uploading photos on version 3.8 too.

    I just did a search here and see quite a few other people have problems with uploading photos on version 3.8 too.

    I don’t think you can group all uploading issues into any singular category or cause, though. You can find those issues going back a long way. There’s a lot of causes. It isn’t indicative of just a 3.8 issue.

    The only other thing I can think of, is that previous versions of WordPress let you set the uploads path in media settings, with the default being wp-content/uploads, but that seems like a bit of a longshot to me – unless you had some other uploads path defined in the database you imported, I wouldn’t think that should be an issue.

    Just for giggles – and because I’m out of ideas – log into the site and go to /wp-admin/options.php and see what is in these fields:




    I don’t know if this tells you what is in the “fields,” but this is what I find searching on those terms in that file:

    $whitelist_options[‘media’][] = ‘uploads_use_yearmonth_folders’;

    // If upload_url_path and upload_path are both default values, they’re locked.
    if ( get_option( ‘upload_url_path’ ) || ( get_option(‘upload_path’) != ‘wp-content/uploads’ && get_option(‘upload_path’) ) ) {
    $whitelist_options[‘media’][] = ‘upload_path’;
    $whitelist_options[‘media’][] = ‘upload_url_path’;

    Is that what you’re looking for?

    I set up this site originally on the old host, and I wasn’t doing anything fancy with uploads paths or anything. It was a straightforward 5-minute install.

    I just now remembered something. I had installed a plugin called EWWW image optimizer on a sister site which worked fine and after I moved this site I installed it here as well. I activated it and tried a bulk optimize of the images on the site. That failed with some sort of path problem so I just de-activated the plugin. I don’t know it this could be a cause, or if it just failed because of whatever the permissions problem is. The only other image related plugin on the site is soliloquy lite.

    Is that what you’re looking for?

    No. As I mentioned, you will need to log into the site, then visit the site at:

    Type that right in the browser address bar and it will take you to a page where you can view the site options in your browser. On that page you will find three entries:




    To the right of those entries will be the values. I would expect the values in those fields to be (if you have ‘organize my uploads into month- and year-based folders’ selected in settings)

    uploads_use_yearmonth_folders = 1

    upload_path = blank

    upload_url_path = blank

    See if yours say something different. Upload paths can also be manually defined in wp-config.php, so you might also double check in your wp-config file just to make sure that no upload constants have been defined in that file at some point in the past. An example of what that constant would look like:

    That was it! I don’t know why or how, but there was a path (from the old host location) specified in the upload_path field. I removed it and it uploaded a photo. Thanks for your help and your patience!

    (Just in case this turns up in someone else’s search, I don’t think it could have been the image optimizer plugin because the path was specific to the old host and the plugin was only installed on the new host.)

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Can't upload photos in recently moved 3.8 site’ is closed to new replies.