Unable to import theme data wordpress droplet

Posted June 27, 2019 3.8k views
WordPressNetworkingUbuntu 18.04

I have setup wordpress droplet on X.X.X.X. I have setup https using cloudfare.

Whenever I try to install theme I get this error :

An error occurred while fetching file from:!
Reason: httprequestfailed - cURL error 7: Failed to connect to port 443: Connection refused.

I tried sshing into instance and curl -vv . But there also I got

curl: (7) Failed to connect to port 443: Connection refused

I checked ufw and it seems 443 is enabled.

To Action From

22/tcp LIMIT Anywhere

443/tcp ALLOW Anywhere

80/tcp ALLOW Anywhere

22/tcp (v6) LIMIT Anywhere (v6)

443/tcp (v6) ALLOW Anywhere (v6)

80/tcp (v6) ALLOW Anywhere (v6)

Please help me fix this.

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.

Submit an Answer
3 answers

Hey @bestnerdever,

It looks like the issue you were experiencing has now been resolved as when I make a curl request to, it works fine, returning the content of the website. Additionally, if I open the XML file that was failing in my browser, it finds the content correctly.

I’d love to know what the issue was and how you resolved it!
- Matt.

Hey @MattIPv4 ,

it doesnt work when executing the same command from the local machine itself.

  • How very odd, as this is behind Cloudflare, when you ping on the server, do you get the same IP address as pinging it from your own device?

    • Pinging from the instance itself it returns the IP which is mapped to the following entry in /etc/hosts file bestsportsnews

      • Ah okay. What happens if you remove that record (make a backup first, as always!), so the local requests get routed through Cloudflare?

@MattIPv4 , Oh man. That solved it ! Not sure exactly what the issue was.

  • Awesome! It could be that the web server that’s serving WordPress wasn’t configured to serve the content on the loopback address.

    Glad you got it sorted!
    - Matt.