Этот плагин не тестировался с последними 3 основными выпусками WordPress. Скорее всего, он уже не поддерживается и может быть несовместим с текущими версиями WordPress.

Combine JS


WordPress plugin that combines, minifies, and compresses JS files. The JS files that this plugin combines and minifies must be enqueued by using wp_enqueue_script. The plugin combines and minifies JS and writes the output into files in the uploads directory. This plugin uses jsmin.php — PHP implementation of Douglas Crockford’s JSMin. This plugin combines all local JS files into a single file and includes the file in the footer of the theme (requires wp_footer being used in your theme files). Also see the companion plugin, Combine CSS.

Features include:

  • option to change the JS domain if a CDN is used
  • option to change how often JS files get refreshed
  • option to exclude certain JS files from combining
  • option to turn on/off GZIP compression
  • option to move all enqueued JS files to the footer of the site
  • option to turn on debugging


  • This is a screenshot of the Combine JS settings page.


  1. Upload combine-js folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

Часто задаваемые вопросы

JS is not working properly after activating the plugin. What can I do?

You can debug the plugin by activating the debug option on the settings page and reviewing the server’s error log for details. You can try excluding certain JS files from getting combined to see if that fixes the issue. The plugin will not minify any javascript files that have ‘-min’ in the file name, so if you can narrow the issue to a single file, try renaming it with -min and see if that fixes the issue.


Thought Google Page Speed is saying the JS files could be compressed more. http://developers.google.com/speed/pagespeed/insights/?url=theportlandcompany.com
Посмотреть все 7 отзывов

Участники и разработчики

«Combine JS» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:


Перевести «Combine JS» на ваш язык.

Заинтересованы в разработке?

Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.

Журнал изменений


  • fix flock warning spotted by Manuel Razzari on wpengine.


  • Added html output compression and fixed tmp dir issue spotted by jprado.


  • Continued improving of javascript ordering when «Move all JS to footer?» is set to yes.


  • Fixed ordering of javascript when «Move all JS to footer?» is set to yes.


  • Fixed issue related to moving all js to footer and ignore files.


  • Changed explode to regex split for ignore list based on feedback from ckgrafico.


  • Added option to move all js to footer.


  • Optimized how js files are gathered and combined. Added more debugging and created a few functions.


  • Changed gathering of js by using print_scripts_array filter instead of wp_print_scripts. Plugin is now compatible with the JavaScript to Footer plugin.


  • Added back header & footer js inclusions.


  • Have js.php use the conditional tmp path.


  • Fix system tmp directory path.


  • Use system tmp directory if plugin dir is not writable.


  • Additional fix to tmp directory creation; change mkdir to wp_mkdir_p.


  • Fixed issue with auto creation of tmp directory.


  • Fixed notices and warnings in error log.
  • Simplified functionality by including one single JS file in the footer of the site.


  • Fixed notices and warnings in error log (thanks to pha3z).
  • Added glob function to remove cached files when settings saved.


  • Fixed php warning: Warning: Missing argument 2 for CombineJS::compress()


  • Note: Version 0.3 uses a file (js.php) within the plugin directory to serve combined JavaScript files. Also, it requires a tmp directory to be created within the plugin directory; the plugin will create the directory automatically if it has the permission to do so. View the settings page after updating to version 0.3, and it will let you know what commands need to be run, if any.
  • Created standalone script with token argument to serve combined CSS file.
  • Created tmp directory that allows WP settings to be stored in a file.
  • Added newline after minified content that appears to fix some reported JavaScript errors.


  • Fix mime type
  • Change class file name


  • First release!