How to Install PHP GD in Windows 10/11

Hey there, fellow tech enthusiasts! If you're diving into the exciting world of web development and want to explore the wonders of image manipulation in PHP, you're in the right place. In this step-by-step guide, I'll walk you through the process of installing PHP GD on your Windows 10 or 11 system.

But before we jump into the technical stuff, let's briefly understand what PHP GD is and why you might want it on your machine.

What is PHP GD?

PHP GD is like a magic wand for web developers who want to add a touch of visual flair to their websites. It's a graphics library that empowers you to create and play with images using PHP.

Whether you're building a dynamic photo gallery, crafting custom thumbnails, or simply adding some cool visual effects, PHP GD has got your back.

Why Install PHP GD?

Imagine being able to resize, crop, and enhance images directly from your PHP scripts. That's the power PHP GD brings to the table. It opens up a world of possibilities for creative web design and dynamic content generation.

So, if you're ready to take your web development skills to the next level, let's embark on the journey of installing PHP GD on your Windows machine.

So, let's see install or enable the PHP GD extension on Windows 10 or Windows 11.

Step 1: Download PHP
  1. Visit the official PHP website:
  2. Click on the "Downloads" tab.


Step 2: Choose PHP Version
  1. Choose the PHP version that suits your requirements. It's recommended to download the latest stable version.
  2. Select the Windows download and choose either the 32-bit or 64-bit version based on your system architecture.


Step 3: Extract PHP Files
  1. Once the download is complete, extract the contents of the downloaded ZIP file to a location on your computer, e.g., C:\PHP.


Step 4: Configuration

Find the php.ini file:


Locate the following line and remove the semicolon (;) at the beginning:



Save and close the file.


Step 5: Download the GD DLL File
  1. Visit the following URL to download the GD DLL file:
  2. Choose the appropriate DLL file based on your PHP version and system architecture (e.g., php_gd2.dll).
  3. Save the DLL file to the ext folder inside your PHP directory (e.g., C:\PHP\ext).


Step 6: Configure PHP to Use GD
  1. Open the php.ini file again.
  2. Add the following line to enable the GD extension:

Save and close the file.


Step 7: Restart Web Server

If you are using a web server (e.g., Apache or Nginx), restart it to apply the changes.


Step 8: Verify Installation

Create a PHP file (e.g., phpinfo.php) with the following content

  1. Save the file in your web server's root directory.
  2. Open a web browser and navigate to http://localhost/phpinfo.php.
  3. Look for a section about GD in the PHP info page. If GD is listed, the installation was successful.


Congratulations! You've successfully installed PHP GD on Windows 10/11. You can now start using the GD library for image processing in your PHP applications.


You might also like:


Techsolutionstuff | The Complete Guide

I'm a software engineer and the founder of Hailing from India, I craft articles, tutorials, tricks, and tips to aid developers. Explore Laravel, PHP, MySQL, jQuery, Bootstrap, Node.js, Vue.js, and AngularJS in our tech stack.