• Post Category:Technical
  • Post last modified:April 3, 2020
  • 2 minutes read
  • 0
Recently I rebuilt a server using Digital Ocean. WordPress was installed and everything was working except trying to update or add plugin/ theme. This ‘error’ came up. There are X method to overcome this.

1. Insert FTP Credentials.

Like duh, just insert your FTP credentials it will work just. Slightly different story if you are using port 22. The hostname should be ftp.your-domain.com:22. Only use FTPS (SSL) if you have one. Or you can add this line on your wp-config.php on your wordpress root folder. [crayon]/* FTP Credentials in wp-config */ define(“FTP_HOST”, “domain-name”); define(“FTP_USER”, “user”); define(“FTP_PASS”, “password”);[/crayon] Note: Be sure to change the credentials above. But not many like this method because you are leaving your credentials on the server.

2. Insert FS_METHOD

Open your wp-config.php on the root folder of wordpress. Add this line in the file. [crayon] /*FS Method added to bipass FTP*/ define(‘FS_METHOD’,’direct’); [/crayon] If you are getting this error while trying to update
The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php Installation Failed
It could be mean your file permission is wrong and as well as the ownership. Which brings us to the 3rd method.

3. Repair File Permission and Owner using Command Line

Launch your command prompt and SSH to your server. Type the following: Reset all files permission to 664: [crayon] > find /path/to/site/ -type f -exec chmod 664 {} \;[/crayon] Reset all folder permission to 775: [crayon] > find /path/to/site/ -type d -exec chmod 775 {} \;[/crayon] Reset the ownership of group [crayon] > chgrp -R wordpress /path/to/site/[/crayon] Note: Change the “path/to/site” to you wordpress folder on your server. After running those command, everything should be A-ok. Good luck  

Find this post useful? Rate It

Average Rating :0/5 from 0 Votes

No votes so far! Be the first to rate this post.

As you found this post useful...

Help your friend on social media too.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?


Edwin is the CEO of Laman7, also our designer and web developer. He writes about Growth Hacking tactics, digital marketing, a bit of programming and design. He is obsess with growth (trees, revenue, profit, anything) and is outcome driven. Edwin is a cyclist, tree hugger and minimalist.