Connect with us

admin-ajax.php

How to Look for Slow Front-end admin-ajax.php Requests on Your Site

Published

on

Find Slow Admin Ajax Requests in WordPress


If you are focused on making sure that your site is loading as fast as possible it is important to watch for slow POST admin-ajax.php requests being made on your site.

Two tools to use for testing the front-end performance of the site would be GTmetrix and WebPageTest. Looking in the tested sites waterfall for slow requests will show you if one of the active plugins on the site is using admin-ajax.php for a function.

PixelYourSite

An example would be if you are using the PixelYourSite plugin, there is a setting if you are using the conversion API for the Meta pixel (formerly the Facebook Pixel) to use AJAX.

Facebook Pixel - slow admin-ajax

If you are not using caching on the site then you can disable the AJAX option and the admin-ajax.php front-end request will no longer happen. The request will show as being a POST admin-ajax.php request.

The problem is if a plugin is using admin-ajax.php on the front-end of the site that request would bypass caching and can add anywhere between 500ms to 1 second to the site’s load time.

It is important in other plugin examples to look for the post request in GTmetrix since that will help you find which specific plugin is causing that request.

If the culprit plugin has an option to turn off admin-ajax.php requests, you can easily disable it from there. Otherwise, you might have to change the plugin causing the issue for a solid replacement.

Manage all your WordPress sites with the MainWP Dashboard

WordPress Management for Professionals

All MainWP Pro Extensions are available through one of our convenient bundled packages.

Stopping plugins from causing slow and high front-end admin-ajax.php usage will help improve your site’s load time for visitors.

Useful links



Source link

Continue Reading
Click to comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.