Why admin-ajax.php requests fail, which breaks Load More, image resizing and lightbox comments, and how to fix each cause.
Would you like to get Load More and other Instagram Feed features working again when admin-ajax.php requests aren’t getting through?
WordPress answers background requests from your pages through a file named admin-ajax.php, in your site’s wp-admin folder. While someone views your feed, Instagram Feed’s script sends a few requests to that file. If a security plugin, a firewall, or a server rule blocks them, your feed usually still shows its first posts, but some features stop working.
This guide lists each request, explains what stops working when it’s blocked, and walks you through the usual fixes.
Before you get started, make sure Instagram Feed is installed and activated on your site.
Here is what we will cover.
- Which Requests Does the Plugin Send Through admin-ajax.php?
- Recognizing What Stops Working When It’s Blocked
- Checking Whether Your Site Blocks the Requests
- Allowing admin-ajax.php in Your Security Plugin or Firewall
- Checking Your WordPress Address and Site Address
- Fixing JavaScript Errors on the Page
- Frequently Asked Questions
Which Requests Does the Plugin Send Through admin-ajax.php?
Each request has a name, called its action. You’ll see each action in your browser’s developer tools when you check the requests.
| Feature | Action | When the request is sent |
|---|---|---|
| Load More button and Infinite Scroll | sbi_load_more_clicked | When a visitor clicks Load More, or reaches the end of the feed with Infinite Scroll turned on. With Load Initial Posts with AJAX turned on, it also loads the feed’s first posts. |
| Image resizing | sbi_resized_images_submit | When the feed shows posts that don’t have local copies of their images yet. |
| Feed locations | sbi_do_locator | On some page loads, picked at random, to record where the feed is displayed. |
| Comments in the lightbox (Instagram Feed Pro) | sbi_get_comment_cache and sbi_remote_comments_needed | When a visitor opens a post that has comments in the lightbox. |
The image resizing request also records where the feed is displayed. The All Feeds page uses those records for its Instances column. To learn more about the local copies, see our guide on how image resizing works.
To learn how the Load More button and Infinite Scroll work in the feed editor, see our guide on setting up the Load More button and Infinite Scroll.
Next, here is what you and your visitors notice when these requests are blocked.
Recognizing What Stops Working When It’s Blocked
Each blocked request shows up in a different way.
- Load More doesn’t add posts. If the request is blocked or gets an error status, the button stays. Clicking it adds no posts. If the request gets a 200 status but another page answers in the plugin’s place, such as a login page or a security tool’s block page, the button disappears. Screen readers announce “Couldn’t load more posts.”
- Infinite Scroll stops adding posts, because it uses the same request as Load More.
- If Load Initial Posts with AJAX is turned on, the feed shows no posts at all. It loads its first posts through the same request as Load More. To check this setting, go to Instagram Feed » Settings » Advanced.
- New posts keep showing images from Instagram’s servers, because the plugin can’t create their smaller local copies. If the GDPR setting is Yes, the feed waits for local copies. New posts can then show blank placeholder images.
- In Instagram Feed Pro, comments in the lightbox don’t appear. The comments area can keep showing its loading icon.
- The Instances column on the All Feeds page can miss pages where the feed is displayed.
To find out whether your site blocks the requests, you’ll check them in your browser next.
Checking Whether Your Site Blocks the Requests
To get started, we’ll use your browser’s developer tools to see each request and the answer it got. These steps use Google Chrome. Other browsers have the same tools under similar names.
- Log out of WordPress, or open a private window, and go to a page that shows your feed. Some security rules only block visitors who aren’t logged in. Test the page the way your visitors see it.
- Right-click anywhere on the page and click Inspect.
- Next, click the Network tab. Then type admin-ajax in the filter box.
- Reload the page. Then click your feed’s Load More button. If your feed uses Infinite Scroll, scroll to the end of the feed instead. To check lightbox comments, open a post that has comments.
- Next, look at the Status column for each admin-ajax.php request. Every row is named admin-ajax.php. To see which feature a row belongs to, select it. Then open its Payload tab, which shows the action.
A status of 200 means the request reached your site. A 403 (Forbidden) status, or a request marked as failed or blocked, means something on your site or server stopped it. The Console tab usually shows the same error next to the admin-ajax.php address.
If the status is 200 but Load More still doesn’t add posts, select the request and open its Response tab. A login page or a message from a security tool means a rule answered in the plugin’s place. For more on the Console, see our guide on diagnosing a feed with developer tools.
If no admin-ajax.php rows appear, even after you click Load More, the plugin’s script isn’t sending the requests. In that case, skip ahead to Fixing JavaScript Errors on the Page.
If a request is blocked, the next step is to allow it in your security tools.
Allowing admin-ajax.php in Your Security Plugin or Firewall
Many security plugins, firewalls, and hosting providers can block requests to the wp-admin folder. The admin-ajax.php file sits in that folder. Still, admin-ajax.php is the file WordPress supports for these background requests. Many themes and plugins rely on it. Instagram Feed always sends these requests to this file, so the steps below let them through.
- In your security plugin or firewall, open the log of blocked requests and look for entries for /wp-admin/admin-ajax.php from the time you tested.
- Allow requests to /wp-admin/admin-ajax.php. Depending on the tool, this can be an allowlist entry, an exception to a rule, or a setting that protects the wp-admin folder. Keep the exception to that one file, so the rest of the wp-admin folder stays protected.
- Test the feed again with the steps in Checking Whether Your Site Blocks the Requests above.
If your .htaccess file or server settings limit the wp-admin folder to a password or allowed IP addresses, add an exception for admin-ajax.php. This lets visitors reach it.
If you can’t find the rule that blocks it, ask your hosting provider whether their firewall or server rules block admin-ajax.php. Tell them the status you saw in the Network tab.
If the requests still fail, your WordPress settings can be the cause.
Checking Your WordPress Address and Site Address
The plugin builds the admin-ajax.php address from your WordPress settings. If that address doesn’t include the page’s domain, the plugin uses /wp-admin/admin-ajax.php on the page’s own domain instead. This works only when WordPress is installed at the root of that domain.
Note: A wrong value in these fields can make your site unreachable. If you aren’t sure what they should be, ask your hosting provider before you change them.
- In the WordPress dashboard, go to Settings » General.
- Compare the WordPress Address (URL) and Site Address (URL) fields with the address in your browser’s address bar when you view your site. Both fields need the same domain as your address bar, including www if the address bar shows it. If your site uses HTTPS, both need to start with https://.
- If you changed either field, click Save Changes at the bottom of the page.
For more on these two settings, see How to Change Your WordPress Site URLs (Step by Step).
Once the addresses match, test your feed again with the steps in Checking Whether Your Site Blocks the Requests.
If the requests still fail after that, a JavaScript error on the page can be the cause.
Fixing JavaScript Errors on the Page
The plugin’s script on your page sends every one of these requests. A JavaScript error on the page can stop that script before it sends them. To find and fix the error, see our guide on JavaScript errors that stop a feed from working.
That’s it! You now know which requests Instagram Feed sends through admin-ajax.php and how to unblock them. To learn how the plugin creates and stores the local copies of your images, see our guide on how image resizing works.
Frequently Asked Questions
Below, we’ve answered some of the most common questions about admin-ajax.php requests.
Do my lightbox comments load through admin-ajax.php?
Yes, in Instagram Feed Pro. When a visitor opens a post with comments in the lightbox, the plugin first loads the comments it has saved on your site. Then it gets newer ones from Instagram if it needs to. Both requests go through admin-ajax.php. Comments show only in user feeds from a Business Advanced source, with the Comments setting turned on in the feed’s Lightbox section.
Why don’t I see every request each time the page loads?
The image resizing request is sent only for posts that don’t have local copies yet. After the first visit, it’s often not sent at all. The feed locations request is sent on some page loads, picked at random. To see the Load More request, click the Load More button. The comments requests are sent only when a visitor opens a post with comments in the lightbox.
Can my page cache stop Load More from working?
Usually not, in current versions. Since Instagram Feed Pro 6.14.0, the feed on a cached page keeps Load More working. The check code in the page doesn’t expire for visitors who aren’t logged in. A page saved in your cache before you updated can still carry an older code that expires. If Load More fails only on cached pages, clear your page cache.