WordPress on IIS with image issues caused by…you guessed it php_gd2.dll or is it php_gd.dll?
I, like you and so many others run into technical issues. In this case, I was unable to rotate or edit an image I had uploaded. But for me in this instance, the fix wasn’t too hard. Here is what I did, but before I get there just some basic info.
Current Setup
- IIS10
- PHP8.+
If you have those two, then here is how to fix not being able to rotate or edit an image in WordPress…
- Open PHP.INI, usually located in your PHP folder.
- Check to see if you have this:
[PHP_GD2]
extension=php_gd2.dll - Double check that it does NOT have a ” ; ” – if it does, remove it. Having a semicolon tells php not to use it.
- Go to your EXT or extension folder within the PHP folder.
- Find php_gd, in my case, I did not have php_gd2.dll I had php_gd.dll, if you have php_gd.dll then we were in the same boat and we can go to step 6. IF YOU have php_gd2.dll or no php_gd2.dll read more here.
- IF you have php_gd.dll go back to your PHP.INI file and update the file or verify the file has the “2” that had to be removed from the PHP.INI file
[PHP_GD2]
extension=php_gd.dll - Save the PHP.INI file and close it.
- Restart your IIS server.
- Refresh your browser and try to edit an image. It worked for me, and I hope it can work for you!