# Add IMAP PHP Extension

**URL:** <https://community.localwp.com/t/add-imap-php-extension/2382>\
**Category:** Support\
**Created:** [July 28, 2017, 6:45pm UTC](https://community.localwp.com/t/add-imap-php-extension/2382 "2017-07-28T18:45:05Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![clay](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/clay/32/8248_2.png) [@clay](https://community.localwp.com/u/clay)\
**Post date:** [July 31, 2017, 5:10pm UTC](https://community.localwp.com/t/add-imap-php-extension/2382/2 "2017-07-31T17:10:14Z")

</div>

Hi Dieter,

Here’s how you can compile IMAP for PHP 7.1.4 on the Custom environment using [How do I compile additional PHP extensions?](https://local.getflywheel.com/community/t/how-do-i-compile-additional-php-extensions/2272) with a few modifications to the steps.

* * *

**Download and extract the appropriate PECL extension**

1. Download PHP 7.1.4 source here: [http://php.net/get/php-7.1.4.tar.gz/from/a/mirror](http://php.net/get/php-7.1.4.tar.gz/from/a/mirror)
2. Extract PHP 7.1.4 into the site’s `app` folder so it’s adjacent to `public`

**Install Dependencies**

Follow normal steps.

**Install Extension Dependencies**

Run the following: `apt-get install -y libc-client-dev libkrb5-dev`

**Compile the extension using phpize**

Follow steps normally but for step #3, run the following: `./configure --with-php-config=/opt/php/7.1.4/bin/php-config --with-kerberos --with-imap-ssl`

* * *

After those steps, follow the rest of the guide and change `ssh2` to `imap` accordingly.

---

_[View the full topic](https://community.localwp.com/t/add-imap-php-extension/2382)._
