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.
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)
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)
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.
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.
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
or
Apache With Certbot
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
Forgot to tell website is using easyengine