After changing the WordPress version to 5.6, when the site health screen displays [The loopback request could not be completed on the site]
- Published:
category: WordPress
WordPress version 5.6 has been released. Has it been updated yet? ??
WordPress is a CMS that is updated quite frequently, and the specifications may change significantly with minor updates (updates that change the number in the middle) and major updates (updates that change the number at the beginning) like this time, so these If you don’t update properly, you may suddenly have trouble with skipping grades, so I would like to update it frequently if possible.
In my case, I’m the type who jumps at new things, so immediately! !! While suppressing the thought, I try to update important sites while checking if there is any impact by starting from a test site.
This time as well
“Okay, it’s a test site update ~~”
“I have to update the plugins and themes before …”
“OK, there is no problem with the display !! Then next …”
When I was working on it, I wondered if there were any problems with site health. I checked it and it came out! On the site health status screen
The site was unable to complete the loopback request
Item. This is the screen
Maybe it came out from the front? It seems to be a phenomenon that occurs when WordPress 5.5.3 → 5.6 because it comes out when the site is updated to 5.6 on a trial basis, even if it is confirmed on the site before the update with similar specifications. ..
Also, if you click the pull-down and check the contents
The loopback request is used to execute the reserved event. It is also used by the built-in editors for themes and plugins to check the stability of your code.
The loopback request returned an unexpected HTTP status code 403. I couldn’t determine if this was preventing the feature from working as expected.
So from the content
- Editor issues in the functionality of plugins and themes
- Somewhere in the basic operation of WordPress, there is a “403 error” that does not normally occur
It seems that one of the causes is (the former may not be the correct expression).
So, I got the idea that it was a problem with the theme plugin, a problem with the main unit, or a problem with some security function, so I immediately verified it.
Cause of “The site could not complete the loopback request” is displayed on the site health screen
From the above considerations, a common case is
- If there is such a setting in the security plugin
- When access to the management screen is restricted by .htaccess file etc.
- When access is restricted by the security function of the server
I think that is the place
In my case, it is annotated as …, but the cause was that there was some restriction on access to the WordPress administration screen in 2. Specifically, the cause was that the login screen could not be displayed from other than the specified base (global IP address) on .htaccess.
When I commented out the description in this part of .htaccess and checked the site health again, the message disappeared brilliantly (when I uncommented it again, the message was displayed perfectly), so there is evidence that this is correct (popular word! ?) Was obtained.
How to deal with “The loopback request could not be completed at the site”
In my case, I set it myself, and it is dangerous to remove this setting for security reasons, so I decided to leave it as it is.
If there are access restrictions on the management screen side due to the function of the plugin or theme (I think that it is not so much …), stop the plugin, change the theme once, etc. to find the cause and identify it. If there is a setting that can avoid the problem, it will be dealt with there.
When changing the theme, it is recommended to be careful because the theme customizer settings and widget settings may be incorrect (the function to set the security system on the theme side). I don’t think there are many, so it’s okay to doubt the theme at the very end).
The “Site Guard” plug-in that often appears when you search is also one of the security plug-ins, so I think that it may occur with similar plug-ins, even the cause has been identified, and it stops at the required function. If you can’t do it and you have no problem using the site, the conclusion is that you can leave it as it is.
When you don’t want to leave it
But after all, something is displayed in the site health status …
For those who said, the code for dealing with was introduced in the following tweet
Obviously no, it’s wonderful. When I put it on the test site, the test was evaded brilliantly👏👏
The code is shown in the image, so if you make a mistake in transferring it, it will be difficult! !! Therefore, I will post the code for copy and paste below (the original function name has been changed for private use in the sense that I personally use it).
However, the message itself that the loopback request could not be completed on the site points out that the WordPress standard operation check function (site health) may cause a problem on the site, so the cause is clear and sure. I personally feel that it’s best to leave it alone, unless you want to pass it with confidence.
/***** Avoid site health loopback tests *****/
function ha_remove_loopback_requests_test( $tests ){
unset( $tests['async']['loopback_requests'] );
return $tests;
}
add_filter( 'site_status_tests', 'ha_remove_loopback_requests_test' );
- Tags:
- error
Post Author: Knowledge Base Admin