Having problems with the new uploader system? Does it get “stuck” or otherwise not work for you? Things to try:
1. Make sure you uploaded all the WordPress files correctly. Really, this is probably the most common upgrade problem. If you’re getting any sort of “Call to undefined function” message from the uploader, then this is absolutely your problem. Upload ALL the files. Don’t “overwrite if newer”. Delete wp-admin and wp-includes from the server and upload them fresh from the downloaded files. Really, we’re not making this up, and everybody seems to just skip this step. I would even go so far as to suggest that you redownload the WordPress zip file from the download link above. Some people seem to have downloaded the wrong files or had bad downloads that they didn’t notice.
Note when I say “all the files”, I mean “ALL THE FILES”. This includes all the files in the root WordPress directory. Especially wp-settings.php. Failure to update these files in the root has also caused the “blinking Save/Publish button” problem.
2. Clear your browser cache, restart your browser. Do it twice. Browser caches can be persistent little things. Also remove any files from the /wp-content/uploads/js_cache directory on your site. This may fix problems with the visual editor as well.
3. Update your Adobe Flash to the latest version (esp you Linux users!): Flash.
NOTE: If you update to Flash 10, then you must be running WordPress 2.7 or above. The new Flash version 10 is incompatible with older versions of WordPress.
4. Another known issue is where the media buttons don’t appear at all. This happens when you have an older plugin interfering with the JavaScript. I encountered this problem with an older version of WP-Amazon, but any plugin loading its own jQuery can cause the issue. Disable your plugins and see if the buttons appear. If so, reactivate one by one until they don’t appear any more. Upgrade all your plugins as well.
5. The highly popular Bad Behavior plugin breaks the uploader. Upgrade it to 2.0.14 (or later):
http://wordpress.org/extend/plugins/bad-behavior/
6. mod_security might be causing problems. Disable it to see if that is the problem. To do this, make an .htaccess file in your wp-admin directory. Add this to it:
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
That will disable mod_security for the upload file receiving code in the wp-admin directory.
7. Try a smaller image, in pixels. Filesize is largely irrelevant, it’s the width and height of the image that matters. Smaller images require less RAM. Although WordPress does attempt to tell PHP to allow it enough RAM, not all server configurations allow this and so PHP may not be set to have enough memory to work with larger images. Resize the images to web-sizes before uploading them.
8. Q: It uploads without any errors, but it does not generate thumbnails! The images show up full size on the page, or they are scaled in a really ugly manner.
A: In all cases I have seen this, the problem turned out to be with the image itself. WordPress uses the normal PHP functions for working with images, which are in the “GD” library. GD has problems with certain types of images. One particular image type that it cannot handle is grayscale images. If your image is black and white or grayscale, then make sure that it’s a FULL COLOR image. That is, 24 or 32 bits per pixel. IrfanView is particularly good at converting images up from 256 color grayscale to 16 million color images. Just load the image up, select Image->Increase Color Depth, then resave it. Then upload the image.
Additional: A new issue in WordPress 2.6 occurs when you have a custom directory for file uploads. The upload will work, but the link/thumbnail link will be wrong and so the image won’t appear. This is a bug which can be fixed in one of two ways (either works):
a) Specify the correct URL to the upload directory in the “optional” field just below the custom image path field.
b) There’s a new wp-includes/functions.php which will eliminate the issue. Download itand replace your existing wp-includes/functions.php file with it. This fix will be in 2.6.1.
9. Do you have custom settings on the Settings->Miscellaneous screen? If so, make sure that they are correct. The upload directory must not have a leading slash in front of it (uploads instead of /uploads), and the URL must not have a slash at the end of it (http://example.com/uploads instead of http://example.com/uploads/).
Additional Questions:
Q: The gallery’s align left/center/right selection box doesn’t work!
A: Put this or something similar into your theme’s CSS file. The images will then align correctly on that theme. You may need to adjust these for your specific theme.
img.centered, .aligncenter, div.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}
img.alignright {
padding: 4px;
margin: 0 0 2px 7px;
display: inline;
}
img.alignleft {
padding: 4px;
margin: 0 7px 2px 0;
display: inline;
}
.alignright {
float: right;
}
.alignleft {
float: left;
}
The above code is from the default theme.
Q. The captions don’t work or look terrible!
A. Same as before, you need to style them in your theme. Here’s some code that will do the trick. Again, you may need to adjust this to fit your specific theme and color scheme.
.wp-caption {
border: 1px solid #ddd;
text-align: center;
background-color: #f3f3f3;
padding-top: 4px;
margin: 10px;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.wp-caption img {
margin: 0;
padding: 0;
border: 0 none;
}
.wp-caption p.wp-caption-text {
font-size: 11px;
line-height: 17px;
padding: 0 4px 5px;
margin: 0;
}
Q: Why can’t I post “full size” images correctly? Why does WordPress always limit them to 500 pixels wide?
A: Your theme has not been updated to use the new image scaling features properly. WordPress 2.5 allows themes to specify the width of their main content area. The reason for this is that people were commonly posting straight camera photos and then getting annoyed when their images made the blog super wide. All you have to do is add one line to your theme to make it compatible. Add this line to the theme’s functions.php:
$GLOBALS['content_width'] = 800;
Replace 800 with the maximum width you want to allow an image to be in the main blog area.
Q. The “File URL” and “Post URL” buttons don’t work. They just put “File URL” and “Post URL” in there.
A. Stop using Internet Explorer already. Or, if you prefer, download this fixed copy of the wp-admin/includes/media.php file and replace the one in your installation with it:
http://trac.wordpress.org/export/8915/branches/2.6/wp-admin/includes/media.php
—
If any new developments or fixes come to light, we’ll update this post.