How to: Deploy or Retract WSP Package in Sharepoint 2007


In this article I will show you how to deploy and retract a WSP in a Sharepoint web application.

WSP is window solution packages or we can say that it is a bundle of the files. WSP can contain Webpart, Features, Images, DLL, usercontrols as per the requirements.

Let's see how we can deploy a WSP to a Sharepoint Web Application.

Steps To Deploy WSP:

Step 1: Open Command prompt and navigate to the below mentioned folder for STSADM utility.

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

STSADM utility is for adding the WSP solution package in Sharepoint Central Administration.

1.gif
 
Command for Adding the WSP Solution Package: 

stsadm -o addsolution -filename C:\TestWSP.wsp

Step 2: Go to Start --> Administrative Tools -->  Sharepoint 3.0 Central Administration

2.gif
 
You will see Sharepoint Central Administration in Internet Explorer. Click on Solution Management in Global Configuration under operation Tab. 

3.gif
 
You will see the solution that we have added through STSADM command in previous step.

4.gif
 
Here the status is not deployed and Deployed to is having no address.

Now to deploy the WSP in a web application click on the WSP Name. In this case it is testwsp.wsp

After clicking on the WSP name you will get the following screen.

5.gif
 
Now click on Deploy Solution link you will get following screen.

6.gif
 
Select the Web Application from the dropdown and if you want to deploy it on a specific time change the option now to At a specified time. And after that click OK.

Your WSP has been deployed to the selected Web Application.

And if you want to deploy this WSP for all the Web Application on the same time than click on All Content Web application.

After this operation you can see that Status and Deployed to filed value has been changed.

7.gif
 
Retract a WSP:

Retracting is just opposite of deploying a WSP solution package. When you select Retract option for a WSP than all the modifications will vanish that came after deploying a WSP i.e. the Web Application becomes the same as it was before deploying a WSP package.

For retracting a WSP file go to central administration page, Click on Operation Tab, After that go to solution management and click on the WSP name which you want to retract.

8.gif
 
Click on Retract Solution.

9.gif
 
Click on OK button and you are done. It will retract the WSP from the Web Application.In this way we can deploy and retract the WSP solution packages.
Hope this will be a help to you.

erver'>