Solving Issue of WordPress Stops Generating Thumbnails in XAMPP

Updated on 9 June 2023
Wordpress logo

All images that are uploaded to a WordPress site from admin (e.g. via Media Library or inside posts and pages) will have the thumbnails generated automatically.

However, there is a case where WordPress stops generating thumbnails after it is moved from live server to localhost. I encountered the problem when I was developing a WordPress blog locally in a fresh installed XAMPP version 8.2.4-0.

The Cause

WordPress does not generate thumbnails in XAMPP because the PHP GD extension is not enabled yet in that XAMPP installation.

PHP GD extension is an extension required to call Graphics Draw (GD) library whose functions are necessary for creating, handling, and manipulating images in PHP scripts. Prior to PHP version 8.0.0, the extension file was named php_gd2.dll. In the newer PHP versions, the DLL was named php_gd.dll.

How to Install PHP GD Extension in XAMPP

Fresh install of XAMPP usually has this extension commented, so all you need to do is to uncomment it. Here are steps to enable PHP GD extension in XAMPP:

  1. Open php.ini file in C:\xampp\php.

  2. Search for ;extension=gd.

  3. Remove the semicolon, so it will become extension=gd.

  4. Save the change.

  5. Restart XAMPP.

Now your WordPress sites can generate thumbnails in XAMPP whenever you upload images from Media Library or inside posts and pages.

Please leave a comment if you encounter any problems.

First published by  on Last Modified on 9 June 2023.

1 Comment

Add new comment

Add A Comment

Your email address will not be published. Required fields are marked *