nopCommerce 3.5 and VS 2013 - How to publish

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 years ago
I'm new to nopCommerce.  I can run the product on my desktop PC.  Now I want to publish to my domain at my hosting company.  When I designed and developed web form web sites using VS 2013, I would do this:

1. Rebuild my project.
2. Publish my project by using the FTP option on the Publish page.

But I read on one of the forums that this is not the way to deploy nopCommerce.  The documentation says to do this:

1. Open the solution in Visual Studio
2. Re-build the entire solution
3. Publish the "Nop.Web" project from Visual Studio
P.S. When publishing ensure that configuration is set to "Release"

But what options do I use on the Publish page?  Do I select "Deploy" or "Deploy Package"?  I can't seem to find any more info other than the above.  I also read about prepare.bat and deploy.bat.  But I don't know where these bat files are stored.

Seems like there should be step-by-step deployment instructions somewhere to get nopCommerce deployed at my hosting company.  Can someone point me in the right direction?
9 years ago
Look for a tutorial on web deploying for your hosting provider, or a tutorial for your IIS version if you are not using a web panel.

Tutorial for Arvixe:
http://blog.arvixe.com/how-to-use-web-deploy-to-deploy-your-website/

Tutorial for IIS 8 or newer:
http://www.iis.net/learn/install/installing-publishing-technologies/installing-and-configuring-web-deploy-on-iis-80-or-later

When you setup IIS directly with Web Deploy, and configure it on your site it will create a .PublishSettings file, that you can import into visual studio.
9 years ago
Thanks for the reply.  I am doing consulting work for this company and they had a network / web administrator who suddenly left the company.  He used to publish / deploy projects and web sites as needed.  But he took all that knowledge with him.  I'm really lost now.  I struggle when it comes to deploying the project on my PC to a network server or the hosting company.   I'm more of a developer and always had folks around who would publish to the various servers.

I've always been spoiled with the one-click FTP publishing in visual studio.  That is the only way I know how to publish my web sites.  I read thru the link you sent about IIS 8 but was really lost.  I think I will take your advice and ask my hosting company how I can deploy.
9 years ago
Publishing through Visual Studio direct to Production is not how you should be doing it. Publish to a local directory and ftp the files to the web server. You want to have total control over exactly what files you are copying to the web server.
9 years ago
I would deploy the website via FTP. Here is a tutorial that might give you an overall idea: http://blog.arvixe.com/how-to-install-nopcommerce-manually/

If you have data saved in the database, I would simply create a backup or generate script and deploy the database on the server and once you are done deploying the webfiles on the root directory, just update the settings.txt accordingly.
9 years ago
Thanks LK.  I used the instructions in the link you provided and was able to publish to our local server.

Another question though: We are starting out small with just a few products.  We added 6 products and they display exactly like we wanted.  But if I publish again, I want to ensure that I don't clear out my MS SQL database.  What is the correct way to publish without affecting the database?
9 years ago
Publishing is pretty safe, and will not try to wipe your database.
If you want to be extra safe do this:
In visual studio Nop.Web => Publish => Settings:

In File Publish Options => Check Exclude files from the App_Data folder
In Databases => Uncheck Use this connection string at runtime

In visual studio Nop.Web => Publish => Preview:

Look at the text under Databases, if it says "No databases are selected to publish", it really can't do anything to your database.
9 years ago
Joshua,

Ok thanks.  I just wanted to make sure.  I am planning on making some small changes to the site and didn't want to wipe out any data.

Bob
9 years ago
bh0526 wrote:
Thanks LK.  I used the instructions in the link you provided and was able to publish to our local server.

Another question though: We are starting out small with just a few products.  We added 6 products and they display exactly like we wanted.  But if I publish again, I want to ensure that I don't clear out my MS SQL database.  What is the correct way to publish without affecting the database?


You're welcome. I am glad that you were able to publish your website successfully. If you are making any changing in the files (web pages). you can simply upload the files to the server (via ftp) and replace with the old one.

SQL Server Database and webfiles are 2 different things. If you are making changes in the code / web files, it won't affect the database of your site. If you are changing content of your site (via admin section), adding / remove products, all those changes will take place in  the SQL database directly.

Remember, it depends what kind of changes are you making and based on the you will have to update those changes to your server.
9 years ago
bh0526 wrote:
Joshua,

Ok thanks.  I just wanted to make sure.  I am planning on making some small changes to the site and didn't want to wipe out any data.

Bob


Hi Bob,

It shouldbe no problem. Basically to host your nopcommerce site, you just need to upload your files using FTP to your root folder and then check your connection string again.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.