Installing the GD image library

February 5, 2015 11.9k views

Hi - I'm hosting a WordPress site on my droplet (Ubuntu 14.04 x64). On the site I installed a plugin called NextGEN Gallery (more info on that you can check it out but basically it is a photo gallery plugin: [](http://)).

In my local site running on MAMP the plugin functions normally and the site works. However, in my live environment whenever I attempt to use the plugin to create a new gallery (including photos) I get this error from the plugin:

"The site does not support the GD Image library. Please ask your hosting provider to enable it."

I read through the support forums for the plguin and found a number of people who have had the same issue depending on the hosting provider they were using.

I have been searching the community here for this issue and came across this post which seems to be my exact question:

I've extremely unfamiliar and uncomfortable doing this sort of thing so I just want to be certain I follow the right steps here.

It sounds like first I need to use this command to install the GD library: sudo apt-get install php5-gd

Then I need to restart apache2 using this command: sudo service apache2 restart

At this point the above thread loses me. It sounds like I may need to make some change to my php.ini file which lives here: etc/php5/apache2. But it's unclear to me if I really need to do that as I have really no idea if I am or am not using the default php.ini file.

Any help would be greatly appreciated as I really don't know what I am doing and I don't want to mess anything up!

2 Answers

It sounds like you are on the right track. In most cases, all you need to do is:

sudo apt-get install php5-gd
sudo service apache2 restart

You only need to edit php.ini file if you are not using the default. Running the following commands should be quite safe. Give it a shot, and if it doesn't resolve the issue let us know and we can take it from there.

Just wanted to follow up and say this did help me figure this out!

Have another answer? Share your knowledge.