Question

WordPress error "file_get_contents: unable to request the remote URL"

Hello,

I’m getting the error “file_get_contents: unable to request the remote URL” with a opt-in plugin. I tested it on my shared server and there were no issues. No such luck on my droplet.

I spent a few days searching forums. I’ve enabled the following lines in my php.ini.


allow_url_fopen = On
allow_url_inclure = On

I created a test file to make sure it work the allow_ worked.

What else can be the issue? I contacted the plugin developer and they passed it off saying to contact the host. Nice paid support, eh?

Any help would be greatly appreciated.

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.

Accepted Answer

@jforsyth

This is an open forum, so you might want to delete that account again.

What I meant be “URL”, was not where the error occurs, but rather which URL the function file_get_contents is chocking on.

We probably need to check the error log for more details. This command will show the last 30 lines from the error log, which has it’s default location here:

tail -30 /var/log/apache2/error.log

Ok. So on Digital Ocean I can’t use the same email address as my Mailchimp account but it worked on my shared server. I tried a random email address and it worked on Digital Ocean…

It is such a simple bug…

Thanks for your help @hansen

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.