Just to fill you in on my situation.
Running WordPress multi-site version: 3.5.2 clean install.
Zero 3rd party plugins. All of my plugins have been disabled for debugging.
Using WordPress MU Domain Mapping for multiple different TLDs in the network.
I have also spoofed all network URLs to serve file from my local server, rather than the existing live network.
Hosts file: vi /etc/hosts/
Might contain something like:
127.0.0.1 domain-a.com
127.0.0.1 www.domain-a.com
127.0.0.1 domain-b.com
127.0.0.1 www.domain-b.com
for each site in the network .... etc.
I did that, so that I do not have to change site URLs and what have you.
Everything on each network site works as intended. The only issue is uploading media attachments. For whatever reason, they are not uploading properly. User is full-blown administrator user role, so it cannot be permission related.
I am currently running Ubuntu 12.04 with PHP 5.4.6 (FAST-CGI).
When uploading an image, I get some very generic error from WordPress.
Error 40 Year Old … to Life.jpg HTTP error.
After switching the PHP from FAST-CGI
to MOD-PHP
I received a bit more specific of a response from WordPress.
Error 40 Year Old … to Life.jpg The uploaded file could not be moved to wp-content/uploads/sites/3/2013/07.
I have checked out the directory: ./wp-content/uploads/sites/3/2013/
and there is no /07/
created automatically. So I have tried manually creating it and uploading again from both FAST-CGI
and MOD-PHP
, still the same errors follow.
I have looked at something like: ./wp-admin/network/site-settings.php?id=3
in the network admin dashboard, searching for media related options.
Uploads Use Yearmonth Folders => true
Upload Path => '' //blank
Upload Url Path => '' //blank
I have checked the live multi-site network along with other multi-site installs and they seem to have the same settings.
I then began to think it might be .htaccess related.
When I go to Network Admin -> Settings -> Network Setup
It tells me to use:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
Which is what I have been using, other than the slight modification at the beginning (Immediately following RewriteEngine On
) allowing non-www URLs to redirect to www URLs.
Example:
# DOMAIN-A Redirect non-www urls to www
RewriteCond %{HTTP_HOST} ^domain-a.com
RewriteRule ^(.*)$ http://www.domain-a.com/$1 [R=301,L]
# DOMAIN-B Redirect non-www urls to www
RewriteCond %{HTTP_HOST} ^domain-b.com
RewriteRule ^(.*)$ http://www.domain-b.com/$1 [R=301,L]
However, those rules are not the same as the WordPress Codex explains. I have tried the recommendations as per the WordPress Codex, still with no luck on image uploads within my WordPress Multi-Site Network.
I currently have SUBDOMAIN_INSTALL
set to true, using the appropriate rewrite rules as per the WordPress Codex. I have also tried setting SUBDOMAIN_INSTALL
to false, again ... using the appropriate rewrite rules. Neither have corrected the issue.
Live network (Version: 3.5.2) install has also stopped allowing image uploads.
I am not experienced enough with multi-site to know what might be causing this issue. I will continue investigating this unless someone else may have an idea how to fix this issue, please share your acquired knowledge!
Please note that it is 100% not a memory issue. It won't even upload a 1kb image file.
I have tried all of the possible solutions as mentioned in How to Fix HTTP Error When Uploading Images? and still no luck getting this working.
Using Dashboard -> Media -> Add New -> browser uploader
instead of the multi-file uploader, results in and Internal Server error.
For what ever reason, I am able to consistently upload this one random particular image over and over without ANY problems but any other image I try uploading fails... even 1kb sized images.
I'm able to upload some images and not others. Some image uploads throw internal server errors and some don't. Some could be 1kb and some could be 5mb. Absolutely puzzling.