cURL error 7 WordPress problem: Vestacp is a lightweight open-source cpanel alternative. cURL error 7 problem is not a big deal in vestacp.
What is the Problem?
cURL error 7: Failed to connect to domain.com port 443: Connection refused
What is the solution?
The curl 7 error problem is very annoying. If you have VPS with vestacp installed, then this is a common problem.
To solve Curl 7 error in wordpress, you need to edit the
hosts file in your VPS using SSH prompt. In the
hosts file you need to add your ip address and domain name manually.
To solve cURL 7 error in vestacp as well as any vps follow the instructions.
Step 1: Log in to your server using SSH
It will returet with the curl 7 error failed to connect to yourdomain.com using port 80.
The problem should be same as previous one, only the difference is port 443.
curl -vv yourdoman.com
Here the problem is same. can not rebuilt curl bla bla bla…
Enough, now we should try to solve this.
Step 2: Edit the following file (hosts file) using a nano or vim editor.
It should be look like this
The following lines are desirable for IPv6 capable hosts
:1 localhost ip6-localhost ip6-loopback
Enter the following line after the second line
xx.xx.xx.xx by your server ip address; and
yourdomain.com by your fqdn or host domain.
So that the final code looks like this
127.0.0.1 localhost 127.0.1.1 yourdomain.com xx.xx.xx.xx yourdomain.com The following lines are desirable for IPv6 capable hosts :1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters
Step 3: Restart your server
Sudo service nginx restart
sudo service vesta restart
That’s it. Hope the curl 7 problem should be resolved.