{"id":155,"date":"2019-06-03T15:41:35","date_gmt":"2019-06-03T22:41:35","guid":{"rendered":"http:\/\/blog.nillsf.com\/?p=155"},"modified":"2019-07-08T13:37:57","modified_gmt":"2019-07-08T20:37:57","slug":"how-i-moved-my-blog-from-wordpress-com-to-my-own-hosting","status":"publish","type":"post","link":"https:\/\/nillsf.com\/index.php\/2019\/06\/03\/how-i-moved-my-blog-from-wordpress-com-to-my-own-hosting\/","title":{"rendered":"How I moved my blog from wordpress.com to my own hosting"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I decided to move my blog from WordPress.com to a self-hosted WordPress. Although it&#8217;s been a couple months since the last post here, I want to pick up the rhythm. Karim Vaes picked up his blogging after I nudged him, so I couldn&#8217;t stay behind. Before I explain the how though, let me give you a brief explanation to the why I moved over the blog:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why I decided to move my blog to a self-hosted WordPress.<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Recently I&#8217;ve gotten\nvery good mentorship at Microsoft via our Technical Leadership Development\nProgram. One of the key messages from my mentors and the program have been to\nbe more vocal and work out loud more often. Writing regular blog posts is just\none way to accomplish this and certainly a powerful one. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I took the advice\nfrom my mentorship panel &#8211; and did some research on what my role models had to\nsay about this. Two of my role models, Scott Hanselman and James Whittaker, are\nvery clear is giving advice as to why you want to blog more and why you want to\nget out there. The following might be some good reads for you if you are also\nconsidering blogging some more:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.hanselman.com\/blog\/ASocialMediaBrandPrimerManagingYourPersonalBrandWithTwitterFacebookLinkedInYouTubeEtc.aspx\">https:\/\/www.hanselman.com\/blog\/ASocialMediaBrandPrimerManagingYourPersonalBrandWithTwitterFacebookLinkedInYouTubeEtc.aspx<\/a><\/li><li><a href=\"https:\/\/www.hanselman.com\/blog\/YourBlogIsTheEngineOfCommunity.aspx\">https:\/\/www.hanselman.com\/blog\/YourBlogIsTheEngineOfCommunity.aspx<\/a><\/li><li><a href=\"https:\/\/www.hanselman.com\/blog\/YourWordsAreWasted.aspx\">https:\/\/www.hanselman.com\/blog\/YourWordsAreWasted.aspx\n     <\/a><\/li><li><a href=\"https:\/\/www.youtube.com\/watch?v=KOrqFYGuPz0\">https:\/\/www.youtube.com\/watch?v=KOrqFYGuPz0<\/a><\/li><li>(for the MSFT folks reading\n     this, there is a great internal 3 hour talk on career as well. Ping me if\n     you want the link)<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Scott is also very\nvocal about owning your own words and putting skin in the game (aka paying to\nhost your blog). So I decided to listen to his words, and move my blog from a\nfree wordpress.com plan to a self-hosted one. I might at one point decide to move\nit back to wordpress.com and get a paid plan, as I&nbsp; believe in SaaS before PaaS before IaaS and\nwordpress.com gives you great hosting with little management headache. With\nthat being said, doing the hosting myself for the time being and keeping things\nlike WordPress and SSL certs up to date will be an interesting learning\nexperience. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And if you want to learn with me, let me share you how I moved my blog from wordpress.com to a self-hosted WordPress on Azure.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Options for hosting your own WordPress on Azure <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As with any\napplication, architecture is important. Even for hosting WordPress on Azure\nthere are multiple options &#8211; and you need to consider which one you want to\npick. First choice is the compute option, second choice is your database\nhosting (the default platform for WordPress is MySQL). <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the compute\nportion, you have a ton of options:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Virtual Machine, either from\n     an image or build your own<\/li><li>App Service<\/li><li>Container in AKS<\/li><li>Container on ACI<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">I decided on hosting\nthis blog on App Service for a couple reasons. First, App Service is a PaaS\nplatform, meaning you get more &#8216;managed service&#8217; than with a traditional VM. No\nneed to take care of OS updates, auto-scaling is very easy for you, even setting\nup your own domain is pretty straightforward. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Having landed on App\nService for WordPress hosting, you have a couple options for the database\nhosting:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>MySQL on a VM<\/li><li>Azure DB for MySQL<\/li><li>In App DB (basically hosting\n     your MySQL DB on your App Service servers)<\/li><li>MySQL in a container on AKS<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For this choice, Azure DB for MySQL was a winner for me. The service manages both the OS and the DB layer, provides monitoring and management, gives you backup and recovery, and makes it easy to scale up or out (no auto-scaling yet). <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setting up WordPress on App Service and Azure DB for MySQL<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">My first stop when looking to run a new app on Azure is to start of with the Marketplace. And yes, there are a ton of options to host WordPress on Azure in the marketplace, including one that creates an App Service and an Azure DB for MySQL (this must be my lucky day!).<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"680\" height=\"990\" src=\"\/wp-content\/uploads\/2019\/06\/image.png\" alt=\"\" class=\"wp-image-158\" srcset=\"https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image.png 680w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-206x300.png 206w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This means it is as easy as filling in the right info and selecting the rights regions to spin up your new blog. It&#8217;ll then take a couple minutes (about 3 in my case) to set everything up, including the database setup and the connection between WordPress and MySQL. And with that you&#8217;re all set to blog!<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"179\" src=\"\/wp-content\/uploads\/2019\/06\/image-2-1024x179.png\" alt=\"\" class=\"wp-image-160\" srcset=\"https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-2-1024x179.png 1024w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-2-300x52.png 300w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-2-768x134.png 768w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-2.png 1999w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"302\" src=\"\/wp-content\/uploads\/2019\/06\/image-1-1024x302.png\" alt=\"\" class=\"wp-image-159\" srcset=\"https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-1-1024x302.png 1024w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-1-300x88.png 300w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-1-768x227.png 768w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-1.png 1814w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Setting up domains<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before diving into WordPress, I decided to (finally) purchase the nillsf.com domain and use that for the blog. I buy all my domains from namecheap.com. They are a cheap provider for domains (and if I&#8217;m personally paying cheap is better), and often have very cheap (less than 2$) domain options if you&#8217;re simply testing some stuff out. I once owned the franssens.pro domain for 2$ &#8211; and used that for some tests with DNS a while ago. This time however I went for a .com domain, which set me back 9$.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"264\" src=\"\/wp-content\/uploads\/2019\/06\/image-3-1024x264.png\" alt=\"\" class=\"wp-image-161\" srcset=\"https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-3-1024x264.png 1024w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-3-300x77.png 300w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-3-768x198.png 768w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-3.png 1113w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To link my blog on App Service to my domain, I needed to setup the right DNS records in the namecheap console and have Azure do verification that I owned the domain. This all took just a couple of minutes. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"710\" src=\"\/wp-content\/uploads\/2019\/06\/image-4-1024x710.png\" alt=\"\" class=\"wp-image-162\" srcset=\"https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-4-1024x710.png 1024w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-4-300x208.png 300w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-4-768x533.png 768w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-4.png 1701w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">App Service comes with built-in SSL for the azurewebsites.net domain and subdomains, but this certificate doesn&#8217;t help with you website. App Service does sell you certificates, but at 75$ a year I prefer the challenge to setup Let&#8217;s Encrypt and get free (and automated!) SSL certs. <a href=\"https:\/\/blog.nillsf.com\/index.php\/2019\/06\/11\/how-to-setup-https-using-lets-encrypt-on-app-service\/\">I&#8217;ll cover that in the next blog post<\/a>, as I first wanted to get things online (don&#8217;t let perfect be the enemy of good). (btw. In this day and age, don\u2019t put anything critical online without SSL!)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"379\" height=\"70\" src=\"\/wp-content\/uploads\/2019\/06\/image-5.png\" alt=\"\" class=\"wp-image-163\" srcset=\"https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-5.png 379w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-5-300x55.png 300w\" sizes=\"auto, (max-width: 379px) 100vw, 379px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"344\" src=\"\/wp-content\/uploads\/2019\/06\/image-6-1024x344.png\" alt=\"\" class=\"wp-image-164\" srcset=\"https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-6-1024x344.png 1024w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-6-300x101.png 300w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-6-768x258.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">But, with that, I have a WordPress blog that&#8217;s ready for content. Let&#8217;s migrate that content over!<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">How\nto export from wordpress.com and import into your own WordPress<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">It is surprisingly easy and straightforward to export your content from wordpress.com and import into your WordPress. The export itself is an option in the control panel on WordPress.com. This gives you a XML file in a ZIP container that contains all your blog posts (without media files). On your new WordPress you can then import that XML file (not the zip file however) and have WordPress fetch your media files. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"623\" src=\"\/wp-content\/uploads\/2019\/06\/image-7-1024x623.png\" alt=\"\" class=\"wp-image-165\" srcset=\"https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-7-1024x623.png 1024w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-7-300x183.png 300w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-7-768x467.png 768w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-7.png 1400w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"771\" src=\"\/wp-content\/uploads\/2019\/06\/image-8-1024x771.png\" alt=\"\" class=\"wp-image-166\" srcset=\"https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-8-1024x771.png 1024w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-8-300x226.png 300w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-8-768x579.png 768w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-8.png 1423w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"289\" src=\"\/wp-content\/uploads\/2019\/06\/image-9-1024x289.png\" alt=\"\" class=\"wp-image-167\" srcset=\"https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-9-1024x289.png 1024w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-9-300x85.png 300w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-9-768x217.png 768w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image-9.png 1958w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">With that out of the way, you can admire your old content on a new platform. The only thing remaining is to keep on blogging and create new content!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">In closing<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It was an easy\nprocess to setup WordPress on App Service with Azure DB for MySQL to host the\ncontent (I didn&#8217;t even need to touch PHPMyAdmin!). Getting a domain and linking\nthat was straightforward as well, though that broke SSL. Moving the content\nalso worked out well, so I&#8217;m a happy blogger now!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next up, automating\nLet&#8217;s Encrypt SSL certificates on App Service!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I decided to move my blog from WordPress.com to a self-hosted WordPress. Although it&#8217;s been a couple months since the last post here, I want to pick up the rhythm. Karim Vaes picked up his blogging after I nudged him, so I couldn&#8217;t stay behind. Before I explain the how though, let me give you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":158,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[11,8,10,9],"class_list":["post-155","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-app-service","tag-azure","tag-blog","tag-wordpress"],"jetpack_featured_media_url":"https:\/\/nillsfblog.blob.core.windows.net\/media\/2019\/06\/image.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/nillsf.com\/index.php\/wp-json\/wp\/v2\/posts\/155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nillsf.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nillsf.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nillsf.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nillsf.com\/index.php\/wp-json\/wp\/v2\/comments?post=155"}],"version-history":[{"count":4,"href":"https:\/\/nillsf.com\/index.php\/wp-json\/wp\/v2\/posts\/155\/revisions"}],"predecessor-version":[{"id":195,"href":"https:\/\/nillsf.com\/index.php\/wp-json\/wp\/v2\/posts\/155\/revisions\/195"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nillsf.com\/index.php\/wp-json\/wp\/v2\/media\/158"}],"wp:attachment":[{"href":"https:\/\/nillsf.com\/index.php\/wp-json\/wp\/v2\/media?parent=155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nillsf.com\/index.php\/wp-json\/wp\/v2\/categories?post=155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nillsf.com\/index.php\/wp-json\/wp\/v2\/tags?post=155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}