WordPress Site Health will sometimes mention a cURL error. This error is usually caused by a plugin.
Deactivate Plugins
NOTE: It is advised to review the entire cURL error. Plugins, ModSecurity, SSL certificates, and memory limit can all also be a factor contributing to the cURL error.
NOTE: This is generally caused by a WordPress plugin.
- SSH into the server
- Navigate to the document root of the domain by running
cd $(docroot.py domain.com)
REPLACE: domain.com with the domain of the site. - Export a copy of the database by running
wp db export
- Temporarily deactivate all plugins by running
wp plugin deactivate --all
- Navigate back to the Site Health page in the WordPress dashboard
- Check to verify error is no longer there to confirm it is a plugin issue
- Import a copy of the database to restore plugin functionality by running
wp db import backup_file_name.sql
- If disabling the plugins does not appear to resolve the error at all, verify that loopback requests are functioning on the server
TIP: Change -v to -vvvv to get more verbose output. You'll likely get a bunch of JSON output back and this indicates that loopback requests should work 100 normally and the error is caused by something specific to the site.
REPLACE: Replace domain.com with the specific domain for the following commands.
- For HTTP, run
curl -A "IMH-Testagent" -v http://domain.com/wp-json/wp/v2/
- For HTTPS, run
curl -A "IMH-Testagent" -v https://domain.com/wp-json/wp/v2/
- For HTTP, run
- If disabling the plugins does not appear to resolve the error at all, verify that loopback requests are functioning on the server