My Blogs

Untitled design (7)
Share :

Fixing – PHP ZipArchive Extension Enable wordpress xampp

Here’s how to enable both ZipArchive and GD Library in XAMPP for WordPress:


Step 1: Enable ZipArchive & GD in php.ini

  1. Open C:\xampp\php\php.ini in a text editor.
  2. Uncomment these lines (remove the semicolons ;):
   ;extension=zip      → extension=zip
   ;extension=gd       → extension=gd

For newer PHP versions, use:

   ;extension=gd2      → extension=gd2
  1. Save the file.

Step 2: Verify DLL Files Exist

Check these files exist in C:\xampp\php\ext:

  • php_zip.dll
  • php_gd.dll (or php_gd2.dll)

Step 3: Restart Apache

  1. Stop and restart Apache via the XAMPP Control Panel.

Step 4: Confirm Both Extensions are Active

  1. Create a phpinfo.php file in htdocs:
   <?php phpinfo(); ?>
  1. Visit http://localhost/phpinfo.php and search for:
  • ZipArchive → Should show “enabled”
  • GD Support → Should show “enabled”

GD Library Troubleshooting

Issue 1: Missing Dependencies

GD requires additional extensions. Uncomment these in php.ini:

;extension=exif       → extension=exif
;extension=mbstring   → extension=mbstring

Issue 2: Outdated GD Version

Update XAMPP or download the correct GD DLL for your PHP version from PHP for Windows.

Issue 3: Image Functions Not Working

Ensure these features appear in phpinfo() under GD:

  • FreeType Support (for fonts)
  • JPEG Support
  • PNG Support

Why WordPress Needs GD Library

  • Image Processing: Resizing thumbnails, cropping, and editing media.
  • Theme/Plugin Support: Required for image-heavy themes and plugins (e.g., WooCommerce).
  • CAPTCHA: Used in login/comment forms.

WordPress Checks

  1. Go to Dashboard → Tools → Site Health.
  2. Verify no errors about ZipArchive or GD Library.
  3. Test image uploads in Media → Add New.

Final Fixes

  • If extensions still don’t load:
  1. Reinstall XAMPP with the latest version.
  2. Use the XAMPP Add-ons page to install missing PHP extensions.
  3. For WordPress-specific workarounds, use plugins like:

Both extensions are crucial for WordPress core functionality.

Let me know if you need help with specific GD/Zip errors!

Leave a Reply

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

Hire Me Now

Lets Started Collaboration With Me Today