how do I enable getimagesize and CURL?

What’s the CentOS server command to enable getimagesize and CURL? Or the command to check if they are enabled? I need these both enabled for a WordPress plugin I’m using.

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.

Bobby Iliev
Site Moderator
Site Moderator badge
February 6, 2020
Accepted Answer


You can enable those PHP modules by running to following commands:

yum install curl
yum install php-curl

Regarding the getimagesize function, I think that you need to enable allow_url_fopen in your php.ini file. To do that try the following:

  • Run php -i | grep php.ini to find out the location of your php.ini file

  • Edit the file with your favorite editor

  • Look for allow_url_fopen and set it to true

Hope that this helps! Regards, Bobby

Try DigitalOcean for free

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

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

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

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel