After migrating a WordPress instance from one hoster to another, it’s impossible to upload any media. Uploads fail with the message “Unable to create directory wp-content/uploads/2016/11. Is its parent directory writable by the server?”. Also, WordPress tells me that the max file size is 2MB.

I’ve tried the following already:

  • Checking phpinfo(). Nothing suspicious there. phpinfo() tells me that max file size is 32MB.
  • Checking the owner and group for all directories and files.
  • Checking the permissions of files and dirctories. Even setting wp-content/uploads temporarily to 777 didn’t help.
  • Making sure .htaccess is there and correct.
  • Creating a php script that creates the new directory manually, bypassing WordPress. Works like a charm. So php must be configured right.
  • Installing a fresh copy of WordPress in parallel and trying that version out. That works. Uploading media in the parallel installation works perfectly. Max file size is shown as 32MB.

When trying to upload media a couple of times, actually the directory gets created. However, no media gets uploaded and the error message stays the same. I’ve tried to upgrade to the newest version of WordPress in place. Strangely, the updater is able to download the newest archive and to extract it. However, it doesn’t install.

Also now log file is create when I turn on the debugging options. As a WP noob, I’m pretty much in the dark. Any suggestions?

4 Answers
4

I have a similar problem, and the issue is resolved.
Follow the steps:

  1. Login to database phpmyadmin.
  2. Click on your database and find a table with the name “wp_options” and click on it.
    enter image description here

  3. Click on Browse at the right top side.

  4. Find “upload_path” and click on pencil icon to edit field.
    enter image description here

  5. Cut the file location path and paste somewhere for safe side.

  6. Click on Go for save changes.

Issue Resolved
Go to WordPress >Media > add new > upload any file and check.

I hope your issue resolved with this method.

Leave a Reply

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