WordPress Error During the API Request
The following error may occur when attempting to view plugins or themes in WordPress:
If this occurs, you can try editing the http.php file within the wp-includes folder of your WordPress installation. Editing the http.php file is a common fix for this issue; however, it is not guaranteed, as various issues can be the cause of this specific timeout error. Please note that while our agents may have outside knowledge of common web design issues and coding, we are unable to provide assistance with custom coding and scripting, third-party web design, troubleshooting, and website optimization outside of basic internet research.
How to Edit the http.php File
To edit the http.php file:
- Log in to cPanel.
- In the Files section, select the File Manager icon.
- Click on public_html on the left menu.
- Open the wp-includes folder.
- Locate the http.php file and right-click on it.
- In the pop-up menu that appears, select the Edit option.
- In the pop-up that appears, choose Edit to open the Text Editor.
- Scroll down to find the following line:
'timeout' => apply_filters( 'http_request_timeout', 5),
- Update the line to the following:
'timeout' => apply_filters( 'http_request_timeout', 30),
- Click Save Changes in the top-right corner.
- Once these steps are complete, refresh the WordPress page to see if the error has been resolved.
Additional References
If the above fix does not work, here are some support articles you can use.
- How to Install/Uninstall WordPress Plugins
- How to Optimize a WordPress Installation
- Guide To Managing WordPress With Softaculous
- Updating WordPress