Local WordPress installation doesn't crop images

When I try to crop an image in the WordPress backend area of my custom theme, I get the message "There has been an error cropping your image". I have it set up on a local machine using XAMPP. When I set up the exact same theme on a server, it works perfectly fine.

I checked quite some questions that seemed to be similar to my problem, but nothing worked so far.

I disabled all plugins. I checked the php.ini for extension=php_gd2.dll, which is not uncommented. I don't know what else could be the problem.

Interestingly when I change the theme to "Twenty Eleven" cropping images works.

Topic cropping images admin Wordpress

Category Web


For the record since I ended up here when experiencing the same issue on my localhost:

  1. In php.ini, Uncomment the line with: extension=php_gd2.dll
  2. Restart apache / all services

This sorted it out for me (I may have switched a few other services on while I was there, but I believe this is what fixed it!)

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.