WordPress failed to Update Plugin/Theme on Digital Ocean

I am managing multiple clients wordpress websites on Digital Oceans Cloud, and i have faced this issue multiple times. We will learn how to fix ‘wordpress failed to update theme’ When we try to install or update theme or plugin on our wordpress site you may get the error while doing it. We will look into multiple ways to fix this problem. Digital Ocean server have blocked the access to certain directories, we have to enable accessing and changing rights for these folders.

Can’t install WordPress themes – FTP Error

Reference : Link

Solved this problem by adding below line in wp.config

 

Plugin/Theme update failed with below error :

Update Failed: The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Invalid archive structure

Solved partially with below cammand :

WordPress Can not create directory while uploading images

Solved with below command on linux terminal.