# What is the recommended best practice for updating a SharePoint Solution (WSP)?

What is the best way to update a SharePoint solution in a multi-server production environment? We have 2 Web Front Ends which are hardware load balanced and 1 application server. I don't want to cause any downtime of the site for users. I can take Web Front Ends out of the load balancer while doing the update.

Approaches I am considering:

On each server in the farm, one at a time run

Update-SPSolution -local


vs.

On each server in the farm, one at a time run

Uninstall-SPSolution -local
Remove-SPSolution
Install-SPSolution -local

-

Your best bet is to perform the update during a maintenance window which is properly communicated to your end users. It is likely the affected web applications or farm may be unavailable during the deployment (users may briefly receive an HTTP 503 error), so do it when you would normally make the farm unavailable to install Windows/product/security updates or some other planned window (usually during non-business hours).

Messing around with -local can backfire if you're not careful.

-
Thanks this is the approach we decided to go with. –  MLF Nov 28 '11 at 18:14

Call Update-SPSolution without the -local parameter on any server in your farm. As far as I know, an update timer job is automatically scheduled, which updates the solution on every server, where the solution is deployed.

-
Won't that method cause the site to be down for a brief period of time while the solution is upgraded? I don't want to cause any downtime of the site. –  MLF Nov 23 '11 at 16:31
Yes you are right. But anyway, I recommend using the Update-SPSolution (with -local) in order to keep any installed and activated features activated etc. –  Matthias Nov 23 '11 at 16:36

I have had spotty luck with Update-SPSolution where it will occasionally leave older files in /Style Library/. As a result, I use the full uninstall/add for each deployment. It takes 2-3 minutes longer to do but since switching to this I've spent almost no time having to troubleshoot issues related to files that didn't get replaced.

Disable-SPFeature
Uninstall-SPSolution
Remove-SPSolution
`