WP Manifestindependent plugin directory
manifest / performance / shy-ajax-handler

Shy Ajax Handler

Wordpress Plugin to specify which Plugins should be active while answering an ajax call to admin-ajax.php - much better performance.

★ 5stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/ibes/shy-ajax-handler/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

WordPress plugin to specify which plugins should be active while answering an ajax call to admin-ajax.php - much better performance.

When a WordPress plugin calls admin-ajax.php WordPress will load every active plugin to answer the request. In a lot of cases only the calling plugin is needed to answer the request. The overhead of loading the other plugins will slow the answer down. For autocomplete and similar services, this can be painful.

Install and use the plugin

This plugin should be put in the mu-plugins folder within wp-content (maybe you need to create the folder). MU-Plugins are loaded before all the other plugins.

This plugin is intented to be used by developers. There is no GUI. See the example code in the plugin file how to use it.

You need to find out which action the AJAX call is using.

Learn how plugins use the admin-ajax.php (http://solislab.com/blog/5-tips-for-using-ajax-in-wordpress/)

Get to know the action by looking in the plugin code:

add_action( 'wp_ajax_nopriv_{THE_ACTION}', 'myajax_submit' ); // not logged in
add_action( 'wp_ajax_{THE_ACTION}', 'myajax_submit' );        // logged in

Or check our browsers developer tool for XHR requests and the the action of the request you want to speed up.