I have a hard time recommending a .Net blog engine that is comparable to WordPress in features, ease of use, cost and polish. Frequently I’m recommending to clients who have .Net sites that are looking add a blog to just add WordPress. This will usually require the .Net site has some complexities that aren’t easily transferable (i.e. It’s not just a corporate informational site with static content that is easily transferable to WordPress all together) and that you will have reasonable control over the server environment (no cheap shared hosting environments headaches).
I’m going to be attaching a blog to the APS Job Board which is a little project we are running to keep the people of Chicago (and the US) employed or employed with jobs they actually like. It’s built using the latest and greatest for Microsoft web development (SQL Server, MVC3, Razor layouts, etc.). I poked around looking for some good blogging open source goodness with aspNet MVC3 and the options just aren’t there or mature enough in my opinion. *cough* WebFunnel *cough*
A big benefit of doing it this way it to keep the traffic with your blog and your website integrated. You want to avoid having traffic for your blog on it’s own domain, or a subdomain (i.e. apsjobboardblog.com or blog.absjobboard.com).
One of the major drawbacks would be having to manage the design of the site in two independent code bases, although I think this is the case even with .Net blogging engine options. You will also need 2 developer skills sets if you are looking to do fancy, custom custom stuff with both sides of the application – or one good web firm like APS for instance!
If you didn’t know WordPress will actually run quite nicely on the MS Web Stack. You can even use MS SQL Server instead of MYSQL if you like – which makes the data more accessible to your .Net portions of the site. For the purposes of this tutorial we will be using Windows Server 2008, IIS7, and the MS Web Platform Installer.
Save yourself some pain, and just make sure you have no MySQL server instances previously installed, reboot and stop IIS. Then just simply select WordPress and install via the MS Web Platform Installer tool. It will install MySQL by default, and just go through the steps.
Now in IIS7 go to your .Net web site and create a virtual directory. You can call it whatever you want – but let’s call it “blog” because we like to use common sense here at APS. Set the home directory to your new WordPress website home directory.
There is a final step to make the integration seamless and that is to set your WordPress address (URL) and Site address (URL) to your .Net application’s domain and blog path.
Viola! By the powers invested in me, I now pronounce your .Net website and WordPress blog bound in unholy matrimony.
Chris
Hi, thanks.
I was however hoping that by integrating, you would explain how to embed wordpress content into a .NET website page so that the website design doesn’t have to be built twice over.
Bryan Abbott
Hi Chris,
This is a bit of a different topic, but if you are starting with a .Net site and wish to merely integrate the content from a WordPress site – you would start with the database. Any CMS driven content for the WordPress site is stored the the database, typically MySQL but it can be SQL Server, and you would directly access it through that layer. You could also access it (by it I mean the content, such as blog posts) via RSS. Most Wordpess blogs are set up for RSS inherently and all you need to do is parse a request of the /feed url. This way you could keep the design layer of your .Net site autonomous, and you would need to access and parse the WordPress content into your web app. If you have complete access to both apps, I recommend the database route. Every scenario is different but feel free to hit me up through the site if you wanted to chat over your requirements for the best approach. Good luck and thanks for stopping by.
Alan Ellicott Says :
Bryan,
This is extremely interesting. Please excuse my stupidity but I need clarification as to what this will allow me to do. I have a client with a legacy .NET web site – all hard coded and not a CMS. They want a blog (just a single page) and this seems the way to go. I have no problems with WordPress and simply wish a WordPress blog to be under the same URL as the main .NET site.
I appreciate that we will have to move them to a dedicated server so that I can fiddle with IIS.
Have you got an example of this running on a site that I could look at from a user point of view?
Many thanks
Alan
Bryan Abbott
Hi Alan,
That sounds like the exact scenario where this would be helpful. You merely create a new web application in IIS with a fresh WordPress installation – the blog post should detail that step. Then you create a virtual directory in the old .Net application and map it to the the new Worpdress app you created. For instance, http://apsjobboard.com/blog . I have a directory in my MVC job board app that I named /blog and it just routes traffic to the blog for that url.
Feel free to contact me directly through the site if you need any further help.
Cheers!
Gemma
Total novice here & clueless. I’ve just started a website with create.net & I’m trying to add wordpress to it – is that even possible? Or even an rss feed? Be happy with either. Hope you can help 🙂
Many Says :
please someone tell me how to integrate wordpress in .net website I completely new to .net but expert in php.
Sim
Hi Brian,
I have a client site made via .NET 2, which has got many public pages and some user (logged in) pages.
The client wants to rebrand the entire site and use word press for the new design. This will mean that some private pages of the NET application needs to run under WP which is going to become the master site.
How is this possible?
Regards
Sim
Bryan_Abbott
Hi Sim,
Sorry for the late response, but the best way to handle that would be with URL rewrites via IIS. Read my comment to Ralph below. You would need to style the .Net application as close to the WordPress install as much as possible, but you can’t have them run natively together.
Cheers!
Ralph
Hi Alan,
Great article. Our current website has a .net front/public end and also a .net back/user end for customers to access their account info. We wanted to change the frontend to a WordPress (for convenience of CMS) but keep the backend in .net. So for example http://www.mysite.com goes to the new WordPress site, but http://www.mysite.com/user/login.aspx is the login page for the user area. Which is a little bit different to what you wrote here of having a .net website with a wordpress area or blog in a virtual directory. WOuld the integration be the same in our case? How would we achieve having the main domain point to the wordpress site but have directory or directories on .net? Thanks.
Bryan_Abbott
Hey Ralph,
Sorry for the late response, but I’ve been busy with clients and having babies. I figured a late response is better than none. Yes, the integration would be the same. You would just configure the default home page via IIS to the virtual root of the WordPress install. You would need to do an additional step to rewrite urls to the .net app. For instance any /user URL you would need to configure a regex in IIS. Any urls relevant the app would need to be routed. You can read up on that here. http://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module