February 25, 2013

250 words 2 mins read

“Add Media” broken in WordPress 3.5

A little while back I upgraded to WordPress 3.5.X like a good little server admin. Sometime shortly thereafter I noticed the “Add Media” button stopped working, or it would work randomly for one post and not another. Very strange and very annoying since that is the one button I actually need (I write in HTML format, so I don’t need the rest of the WYSIWYG interface to work). After a bit of Googling, checking forum posts, and a little luck, I found my two pronged solution.

wp security scan
The first problem was fairly obvious. As with anything you can add plugins/extensions into, one is probably to blame. In this particular case (through a forum post) I found that “WP Security Scan” by WebsiteDefenders was that problem child plugin. Part of what it does (if you let it) is edit your .htaccess file, so you need to be sure to remove those changes. If you’ve ever had this plugin enabled, you need to check/fix your .htaccess file.

Even after finding the troubled plugin, my “Add Media” button still wasn’t working. The second fix required a small modification to my wp-config.php file. I added define('CONCATENATE_SCRIPTS', false ); to the end of the file, just before require_once(ABSPATH . 'wp-settings.php');. I’m not sure why this was necessary, but I presume it has to with my use of performance enhancing plugins.

Speaking of performance enhancements… If you have any caching plugins, make sure you purge the page/file cache after each change before testing your “Add Media” button.