WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How/Where is the wp-admin/js/editor.min.js file added to the backend WordPress post editing page (wp-admin/post.php)? How could I change this to use the non-minified file?

I'm working on a browser extension that will interact with a WordPress installation. I'd like to add some temporary debugging code the the editor.js file. However, in a standard WordPress 3.5.1 site, this file is already minimized, and somehow loaded on the page via a mechanism that isn't a standard <script/> tag. I'd like to know how the WordPress core team includes (and/or a minimize workflow for) this file.

Put another way, if I wanted to add a feature that required changing editor.js, how would I go about developing that.

Competent programmer here, not super familiar with WordPress's architecture. In case my words failed me above, I'm not looking to extend WordPress, I'm trying to diagnose existing system behavior.

Thanks in advance!

share|improve this question
It's generally a bad idea to edit core files. It should never be needed. But since it's a real file, what's to stop you from prettifying it in an IDE and then re-minifying it after you've made edits? – GhostToast Jun 5 '13 at 17:34
@GhostToast Agreed GhostToast, I'm only interested in learning the mechanisms of how WordPress works with these files so I understand the system better. I'd never deploy with changes to these files. – Alan Storm Jun 5 '13 at 17:36
Hmm. I see. Hard to find out where it is being called from. Have you tried deleting/renaming file and seeing if an error is thrown in its absence? Might give us a clue – GhostToast Jun 5 '13 at 17:46
up vote 3 down vote accepted

WordPress concatenates scripts via the script-loader.php file.

You can disable the concatenation of scripts by adding this to your wp-config.php:

define('CONCATENATE_SCRIPTS', false);

You can load the non-minified versions by adding this to wp-config.php:

define('SCRIPT_DEBUG', true);
share|improve this answer

Put define('SCRIPT_DEBUG', true); into your wp-config.php. It will force to use editor.js which is not minified (development) version of editor.min.js. You can test your changes and when satisfied minify it then replace original editor.min.js with it. Remember to keep your version backed up so you will not lose it during core upgrade.

share|improve this answer

To use the unminified code, you can just unregister the minified JS and register the non-minified code.

However, there's really no reason to do this if you just want to explore the code.. just view the file in your IDE. All of the files are in '/wp-admin/js'.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.