WordPress Editor Toolbar and Add Media Button Fix

With the release of WordPress 3.6 a number of sites have reported an issue with displaying and using the editor toolbar and the Add Media button when editing posts and pages. Research indicates that this issue has come up before for some sites but not others, and it can be quite disruptive to users who just want to be able to get on with the job of writing content.

What’s going on?

The first thought was that this was an issue with the latest WordPress release, since it only occurred after an update. A quick check of the WordPress forums and support areas showed that it wasn’t a specific issue related to WordPress 3.6 but that some users had come across it from time to time as far back as mid-2011.

WordPress by default combines all of the javascript that gets loaded in the administration area which helps to speed up loading of the pages. It appears that this can sometimes not work properly, perhaps due to an issue in one of the scripts loaded either from WordPress core or a plugin installed on the site. One broken script can lead to a error which causes all other scripts to stop responding since they are all joined together in the one file. This stops the Add Media button from working and can stop the Editor Toolbar from even appearing.


A simple workaround is to disable this feature by adding a configuration option to wp-config.php. Open wp-config.php in a text editor and insert the following line:

define('CONCATENATE_SCRIPTS', false);

You could add this anywhere, but I’d recommend it putting it just before the line where you’re told to stop editing. In my case, this ended up looking like the following:

This will force WordPress to load each script on the administration page individually rater than bringing them all together. If one script fails to load and work correctly, the others can still continue to operate correctly.
There will be no difference in the performance of your site as this only affects the administration section and there will be very little change in speed there as well. But you’ll get all of the functionality you’ve come to use working again.