# Plugin update not working

**URL:** <https://community.kinsta.com/t/plugin-update-not-working/4573>\
**Category:** Questions\
**Created:** [December 16, 2024, 4:11pm UTC](https://community.kinsta.com/t/plugin-update-not-working/4573 "2024-12-16T16:11:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![clembcn](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/clembcn/32/4282_2.png) [@clembcn](https://community.kinsta.com/u/clembcn)\
**Post date:** [December 16, 2024, 4:11pm UTC](https://community.kinsta.com/t/plugin-update-not-working/4573/1 "2024-12-16T16:11:45Z")

</div>

Hello,

I am trying to update plugins using wp-cli update, to do so I executed following commands:  
docker exec -u www-data -it devkinsta\_fpm bash  
cd /www/kinsta/public/mywebsite  
wp update myplugin

I get a permission denied error:  
Failed to create directory ‘/var/www/.wp-cli/cache/’: mkdir(): Permission denied.

So I tried to sudo chmod the .wp-cli folder:  
sudo chown -R www-data:www-data /var/www/.wp-cli

What is the default sudo password? Is it the right way to solve this issue?

Thank you

UPDATE:  
I managed to update another plugin, it seems the problem is with connects-woocommerce specifically

---

<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:** [December 16, 2024, 11:49pm UTC](https://community.kinsta.com/t/plugin-update-not-working/4573/2 "2024-12-16T23:49:17Z")

</div>

Hello @clembcn and welcome to our community! 👋

In case you would like to set permission of that `/var/www/` sub-folder (and its folders/subfolders) with `www-data` user, you could execute the following command first to access the docker as `root` instead of as `www-data` user:

> docker exec -it devkinsta\_fpm bash

then you can perform the following command:

> chown -R www-data:www-data /var/www/

Once done, you can exit from that docker and re-access with the `www-data` user:

> docker exec -u www-data -it devkinsta\_fpm bash

and try to perform that `wp plugin update thepluginname` , and it should be able to create directories and/or files under that `/var/www/.wp-cli/cache/` sub-folder(s).

Hope that helps! 🙇‍♂️

Best regards,  
Agus Utomo

---

<div class="post-metadata">

**Author:** ![clembcn](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/clembcn/32/4282_2.png) [@clembcn](https://community.kinsta.com/u/clembcn)\
**Post date:** [December 17, 2024, 3:39pm UTC](https://community.kinsta.com/t/plugin-update-not-working/4573/3 "2024-12-17T15:39:11Z")

</div>

Thank you for the feedback, I have worked around the problem but will take good not for next time 🙂

---

<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:** [December 20, 2024, 3:39am UTC](https://community.kinsta.com/t/plugin-update-not-working/4573/4 "2024-12-20T03:39:15Z")

</div>

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