# Less is unavailable within devkinsta\_fpm container, breaks WP CLI

**URL:** <https://community.kinsta.com/t/less-is-unavailable-within-devkinsta-fpm-container-breaks-wp-cli/2585>\
**Category:** Bug Reports\
**Created:** [October 17, 2023, 7:52pm UTC](https://community.kinsta.com/t/less-is-unavailable-within-devkinsta-fpm-container-breaks-wp-cli/2585 "2023-10-17T19:52:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![colby.l](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/colby.l/32/2114_2.png) [@colby.l](https://community.kinsta.com/u/colby.l)\
**Post date:** [October 17, 2023, 7:52pm UTC](https://community.kinsta.com/t/less-is-unavailable-within-devkinsta-fpm-container-breaks-wp-cli/2585/1 "2023-10-17T19:52:10Z")

</div>

**Q: Date/Time this occurred (Provide your time zone also)**  
**A:** October 17, 2023 at 1:46PM MT

**Q: DevKinsta Version**  
**A:** 2.11.0.7044

**Q: OS Version**  
**A:** macOS Sonoma 14.0

**Q: Docker Desktop Version**  
**A:** 4.24.2 (124339)

**Q: Were any error codes or messages observed? If so, what were they?**  
**A:** `bash: less: command not found`

**Q: Detailed Description of the Problem**  
**A:** I’m attempting to use WP CLI within `devkinsta_fpm` and am unable to run any WP-CLI commands that utilize `less` (including the help docs). When I attempt to do so, the console errors state that `less` is not found within the `PATH`.

You can replicate this by attempting to run `wp help` within the `devkinsta_fpm` container, like so:

```auto
$ docker exec --user www-data -it devkinsta_fpm wp help
sh: 1: less: not found

```

---

<div class="post-metadata">

**Author:** ![ZachE](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/zache/32/1683_2.png) [@ZachE](https://community.kinsta.com/u/ZachE)\
**Post date:** [October 17, 2023, 11:43pm UTC](https://community.kinsta.com/t/less-is-unavailable-within-devkinsta-fpm-container-breaks-wp-cli/2585/3 "2023-10-17T23:43:09Z")

</div>

Hi @colby.l 👋

Thank you for your report! We’ll review this and provide you with further updates as soon as possible

I’m able to replicate on macOS 13.6 (Ventura) on 2.11.0 DevKinsta, and Docker Desktop version 4.24.2

Best regards,  
Zach

---

<div class="post-metadata">

**Author:** ![Agus](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/agus/32/1515_2.png) [@Agus](https://community.kinsta.com/u/Agus)\
**Post date:** [October 18, 2023, 12:32am UTC](https://community.kinsta.com/t/less-is-unavailable-within-devkinsta-fpm-container-breaks-wp-cli/2585/4 "2023-10-18T00:32:06Z")

</div>

Hey @colby.l👋

I was able to replicate the same on my end as well (I’m using Linux Ubuntu 22.04 and DevKinsta 2.11.0), so yeah I could confirm that `less` program is not available/included by default in that `devkinsta_fpm` container.

```auto
agus@Lenovo-IdeaPad-FLEX-15IWL:~$ docker exec --user www-data -it devkinsta_fpm /usr/local/bin/wp help
sh: 1: less: not found
agus@Lenovo-IdeaPad-FLEX-15IWL:~$ docker exec --user www-data -it devkinsta_fpm whereis less
less:

```

As a workaround, we could still install `less` inside that docker’s container (with` root` access) 😄  
I just did it and now could use the “wp help” command line .

So you could do the same as follow:

1. Go inside that `devkinsta_fpm` container with `root` user with this command line:  
`docker exec -it devkinsta_fpm bash`

2. Inside that `devkinsta_fpm` container (as `root`), make sure that you’re connected to the Internet and please type this:  
`apt update`

3. After that apt update process has completed, you can then type the following:  
`apt install less`

4. Then after the `less` program has been installed successfully inside that `devkinsta_fpm` container, you can just type: `exit` (to exit from that container).

5. Now you should be able to execute the previous command line from your terminal:  
`docker exec --user www-data -it devkinsta_fpm wp help`

and if you check with this command:  
`docker exec --user www-data -it devkinsta_fpm whereis less`  
that should return with the following:  
`less: /usr/bin/less`

Hope that helps! 😃

regards,  
Agus

---

<div class="post-metadata">

**Author:** ![colby.l](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/colby.l/32/2114_2.png) [@colby.l](https://community.kinsta.com/u/colby.l)\
**Post date:** [October 18, 2023, 10:04pm UTC](https://community.kinsta.com/t/less-is-unavailable-within-devkinsta-fpm-container-breaks-wp-cli/2585/5 "2023-10-18T22:04:49Z")

</div>

Oh wow! I should have taken a peek at the Dockerfile beforehand (… going to blame that on end-of-day-debugging 😅)—would have quickly realized it’s an Ubuntu image, not Alpine (as I was trying `apk add less`).

You may want to update [this documentation page on WP-CLI with DevKinsta](https://kinsta.com/knowledgebase/devkinsta/wp-cli/)—it doesn’t mention that only certain WP-CLI commands will work out-of-the-box and led me to reporting this as a bug. 😅

Thanks so much for the quick clarification & steps to mitigate!

---

<div class="post-metadata">

**Author:** ![Agus](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/agus/32/1515_2.png) [@Agus](https://community.kinsta.com/u/Agus)\
**Post date:** [October 19, 2023, 1:44am UTC](https://community.kinsta.com/t/less-is-unavailable-within-devkinsta-fpm-container-breaks-wp-cli/2585/6 "2023-10-19T01:44:05Z")

</div>

You’re most welcome @colby.l ! 🙇‍♂️

Cool, thank you! I have passed your suggestion to our internal team, see if they can review this and make an update to that documentation page in question when necessary! 😃

regards,  
Agus

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/8/80f8c4e56fecc02327a0964e6bf63a716483529f.png) [@system](https://community.kinsta.com/u/system)\
**Post date:** [October 21, 2023, 1:44pm UTC](https://community.kinsta.com/t/less-is-unavailable-within-devkinsta-fpm-container-breaks-wp-cli/2585/8 "2023-10-21T13:44:56Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
