Question

Please Help me Out (Unable to communicate back with site to check for fatal errors)

  1. ERROR:- Unable to communicate back with the site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP.

  2. ERROR:- The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages.

The REST API request failed due to an error. Error: cURL error 7: Failed to connect to EXAMPLE.in port 443: Connection refused (http_request_failed)

  1. Error:- Loopback requests are used to run scheduled events, and are also used by the built-in editors for themes and plugins to verify code stability.

The loopback request to your site failed, this means features relying on them are not currently working as expected. Error: cURL error 7: Failed to connect to example.in port 443: Connection refused (http_request_failed)

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I was encountering the same issue and figured it out. If you check in your /etc/hosts file you should see a like 127.0.0.1 mydomain.com. Just comment out that line and it should start working. I hope this helps.

Hi @abhishekbhandari,

So it seems like your website is running correctly. Then how are you experiencing these REST API errors? From the CURL command I can see port to 443 seems to be opened.

Hi @abhishekbhandari,

It seems that your website doesn’t have an SSL certificate and as such, you can’t connect to port 443(https). Another issue might be the fact that your port 443 is not allowed on the droplet you have.

First, I recommend using certbot to try and install a Free SSL Certificate for your website. Depending on the WebService you are using you can either use this article :

Nginx with Certbot

https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-18-04

or

Apache With Certbot

https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-20-04

Once you have Certbot installed and your SSL issued. Try and allow your port 443 on the droplet so that connections to it are allowed. If you are using IPtables, you can type in the following command to allow it:

iptables -A INPUT -p tcp --dport 443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT 
iptables -A OUTPUT -p tcp --sport 443 -m conntrack --ctstate ESTABLISHED -j ACCEPT.

Regards, KFSys