Publishing Your Local MojoPortal Website
Written by Ian McIntosh Tuesday, 12 July 2011
Now that you have prepared your local and remote environments, you are in a position to move your website between the two environments. At this stage, it is just to give you confidence that you will be able to publish your site easily when the time comes.
General working practice should be to build your site completely on your local environment and perform your testing there before publishing it to your remote site. However, when I first started with MojoPortal, I wanted to make sure it would work on my remote environment before investing too much time building up my first website.
So I suggest publishing your site onto your hosting site; but only for your own personal testing use. You do not want people signing up to it just yet because your local site is still your main working environment. The next time you publish it, you will lose any data, including the people that have already signed in to your site.
Create a Website
You probably already have your domain and website available within your control panel (in which case you can skip down to the next section); but if you don’t, you can create them.
Select Domains, then Add Domain
Then, click Domain
If you don’t already have a website on you control panel, you can create one by selecting Web Sites, then Create Web Site
Turn On Remote Management
Before you can publish with WebDeploy, you need to enable Remote Management.
Log in to your control panel. Select Websites and click on your website to bring up the Website Properties page.
On the Extensions tab, make sure ASP 4.0 (Integrated Pipeline) is selected:
On the Management tab, create a remote management user and click Enable
Make sure you make a note of your username and password. For security reasons, you may want to generally keep this disabled when you are not using it.
Create a Publish Settings File
The publish settings file is just an XML file containing the details needed to publish your site. You do not actually need to create this, but it does make life easier.
If you do not already have an XML editor, I suggest downloading Notepad++. It is free and easy to use. You can download it here.
Create the file MPDemo.publishsettings using the following as a guide:
You will need to replace anything in angle brackets, for example replace <your site> with mysite.com.
Publish Your Website
With WebMatrix running your local site, click Publish
Now, you can import you publish settings file by clicking Import Publish Settings. Then, press the Validate Connection button to test your settings. Finally, press Save.
Side note: I had a few reliability issues when I first tried to do this. Sometimes I got the green tick, sometimes not. If I used a wired connection to my router rather than wireless, it was more stable. I have since downloaded the Windows 7 SP1 and a few fixes specific to my computer and, fingers crossed; it seems a bit more reliable now.
When you press Save, WebMatrix may ask to do a test. Just select OK, and after a short while, it will display the results of the test:
Notice here that Arvixe is fully compatible. This is not the case for many other providers!
Press Continue and WebMatrix will go through the process of identifying changes between your local and remote sites. This can take some time, so you will need to be a bit patient. For me, it took a couple minutes – but I live on a remote island in the Outer Hebrides where the internet connection is not always the fastest, so maybe it will be a lot quicker for you.
You will then see a list of files to be uploaded (you will have more listed than shown below because this is a shot from a second publish). You are able to deselect individual files here if you wish. Make sure the database is ticked, BUT do be aware that uploading a database completely overwrites the remote database, so you will lose any data in that. If you’re following this guide, that is OK.
Now, this DOES take a long time. For me, it could take anywhere from a few minutes to an hour or two. Eventually, you should get a ‘Publishing Complete’ message that may or may not stay around (it depends on the settings of Web Matrix) – and that’s it. Publishing complete!
Now you will be glad to hear that all the setup has been done for publishing. Next time you want to publish, it is pretty much a single button press affair, which means you can develop your site locally, and from time to time, push it out to your hosted account just to check that it all works there.
Assuming you have followed the series of posts, you now have everything installed and setup that you need to develop your site locally and publish to your hosted account. You may now want to create a second MojoPortal installation that you can play around with and test out the features of MojoPortal, leaving the first one for following future posts.
In the next article, I will guide you through downloading your published site. While it is not something you strictly need to do and not something you should look to do on a regular basis, it is somewhat of a comforter to me to know I can do it – I will explain more in that article.
Looking for quality mojoPortal Hosting? Look no further than Arvixe Web Hosting.