Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k points)

I've got a brand new install of WordPress setup and activated a custom-built theme along with a good amount of plugins. In the posts, I have built it so the user can create a post, upload an image as a thumbnail and it will automatically resize the image to a custom size set in my functions.php file.

All this has been working on my local end (MAMP) correctly but when I tried making everything work on our Amazon EC2 server, the images do not resize to the size set. They resize by actual code but do not resize the actual image and save it in the new size.

Apologies if the question/subject is completely non-sense but I have little to no experience with Amazon EC2 servers and I have been placed into a situation where the person in charge of all the work within EC2 had to leave the project.

I'm assuming that this has to do with the GD library not being installed. I created a test page with phpinfo() and didn't see a GD area on the results page.

How would I go about installing the library on my Amazon EC2 server? I just learned how to connect to the server via Terminal and that's all I've got for now.. so you get an idea of how much I know about the subject.

1 Answer

0 votes
by (44.4k points)

Install and then restart Apache.

If you use Ubuntu:

sudo apt-get install php7-gd CentOS

service httpd restart

If CentOS:

sudo yum install php-gd

service apache2 restart

Related questions

0 votes
1 answer

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
asked Jul 12, 2019 in AWS by yuvraj (19.1k points)
0 votes
1 answer
asked Jul 11, 2019 in AWS by Amyra (12.9k points)
0 votes
1 answer
0 votes
1 answer

Browse Categories

...