最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

admin - Local WordPress installation doesn't crop images

programmeradmin0浏览0评论

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.

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.

Share Improve this question asked Aug 24, 2017 at 17:43 TheKidsWantDjentTheKidsWantDjent 3154 silver badges19 bronze badges 2
  • Your theme might be forcing WordPress to use a specific image library to crop the images which is not supported, you might want to look that one up. – Johansson Commented Aug 24, 2017 at 17:46
  • In addition to the Jack Johansson comment, possible your theme tries to write to not writable folder. And on the server this folder is writable for some reason – Anton Lukin Commented Aug 24, 2017 at 17:50
Add a comment  | 

2 Answers 2

Reset to default 3

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!)

Facing same problem while learning the wordpress with localhost but the above 2 soltions are the exact which i tried and problem solved: locate c/xampp/php/php.ini open file in any editor locate for: ;extension=gd ;extension=php_gd2.dll remove ';' semicolon to uncomment and save the php.ini file restart the apache and you are done !

发布评论

评论列表(0)

  1. 暂无评论