How I transferred my website from wordpress.com to a self-hosted wordpress.org with no downtime
For people who are already familiar with it, transferring their website to a different hosting may be a very trivial process, but for someone like me who has never had a website hosted on anything other than WordPress.com, this was a new experience.
I am writing this post in case someone might find it useful when they’re trying to migrate their website from WordPress.com to a self-hosted WordPress because I too was confused at first. I promise you there’s no code involved here, but it’s still quite intimidating if you’ve never done it before.
Before I transferred my website to a self-hosted WordPress, I had this website on the cheapest plan of WordPress.com. It gave me the benefit of a free domain for a year and a lot of other settings that aren’t available in a free plan.
Unluckily, after about a year, I figured I wanted to access more features, and more features are only available on a self-hosted WordPress, so I decided I had to find a hosting and a registrar. I picked HostKoala and Porkbun after I scoured Reddit subs like r/webhosting and r/domains for days. I learned that out of all the hosting and registrars out there, these two give out their services at the best prices (or you can say they’re affordable enough to be within my budget).
If you don’t believe me, you should know that I spent less than $7 for six months of hosting on HostKoala with CPanel. For domain, I spent less than $8 for a year on PorkBun thanks to tld-list.com (it’s a very useful website to compare domain prices and available vouchers). I was lucky enough to find myself a promo code/discount voucher for these two services, but even without the vouchers, they’re already at very competitive prices, aren’t they? I couldn’t find anything cheaper than these two, to be honest. What a steal, right?
Enough about my story, here’s how I did both the domain transfer and website migration from wordpress.com to a self-hosted WordPress.
Transferring Your Domain to A New Registrar
I got the domain catriscode.com about a year ago for free from WordPress.com when I bought one of their plans. Since I got it from WordPress, my registrar was Automattic (who also owned WordPress). When I wanted to transfer my domain from Automattic to Porkbun, I followed Porkbun’s guidelines here. I thought it was going to be complicated, but it turned out to be much simpler than I thought.
What you need to make sure is your domain needs to be available for transfer, which means you have to go to your WordPress Dashboard and unlock your domain. The setting for it is in Upgrade >> Domain. Inside it, there is the Advanced Options menu where you’ll find the Transfer lock on. You need to unlock it, so you can request an authorization code which will be sent to your email in a few minutes.
Then you can put this authorization code from the email in the Porkbun column next to your Domain Name.
After submitting your domain name and its auth code, you’ll be asked for payment. From here on, it’s pretty explanatory, pay your order and wait for the process.
You’ll get an email asking if you want to proceed with the transfer. The transfer will proceed whether you respond to the email or not. However, what I didn’t realize was you could reduce the transfer time by approving the transfer through a link they sent in the email. It was 2 days of waiting before I realized there was this option. As soon as I clicked ‘approve’, the transfer happened pretty much immediately. Without that approval, I would probably need to wait for 5 more days for the transfer to be done, so check your emails, folks!
Once the process above is done, you need to change your nameservers in Porkbun to the ones by WordPress. Don’t worry, you can easily find WordPress tutorial for this here. But this process should be done automatically when you transferred your domain.
Migrating Your Website from WordPress.com to A Self-Hosted WordPress
This is where it got a little bit complicated. Still, there’s no coding involved, so you don’t need to worry. It just requires a little bit of understanding about a few technical things.
After getting my order from hosting provider, I logged in to my account and was given a username and password to access CPanel. There are a lot of software and widgets provided by CPanel, but since I want to migrate my WordPress website, all I need is to install WordPress from my CPanel.
I was completely lost at this point, so I contacted my hosting help desk for help. They responded pretty quickly and gave me some instructions.
- Change your host file (in your computer)
- Install WordPress on yourdomain.com/wp directory
- Do all the necessary edits
- Decide whether you want your site to be on yourdomain.com or yourdomain.com/wp
- Change your nameservers
Firstly, you need to change your host file on your laptop/computer. You can follow instructions from here (from whatsmydns). The steps are slightly different depending on what OS your computer has. What you need to put into your host file here is your website IP Address that will link to your domain.
The (xxx) is my IP Address. This will make the computer redirects its connection from accessing catriscode.com into the IP Address specified above. So, if your website is still hosted on WordPress.com right now, instead of accessing WordPress.com, your computer will redirect you to the IP Address above (where you are going to host your new WordPress). Remember, this will only work locally, so if you try to access your domains from other devices, it will load into your old WordPress.com.
You can find your host IP Address in your CPanel Dashboard – General Information. It’s on the right-hand side of your CPanel homepage under the “Shared IP Address” column. If you still can’t find it, you can send a ticket to your hosting provider, asking them for this.
Secondly, I used Softaculous Apps Installer to install WordPress in my new hosting. It’s pretty simple as it’s just one click away. You only need to enter your domain and directory, choose which version of WordPress you want to install, fill in a few information like user and password, and you’re ready to go.
I choose to install my website on /wp directory, but you can also install it in any directory name you want (I think the weirder the better, making you safer from bots and other attacks, but make sure they are easy to remember).
You can read more about it on the Softaculous official page here.
Thirdly, you now have a WordPress website installed in your host. If you have any exports file from your old WordPress, you can import them here. Unluckily, since it’s from WordPress.com, I can only export XML and media files. There are still a lot of configurations I needed to do manually, like setting up the theme and pages.
It’s not exactly easy as I found a lot of things to be not working, like the theme. So I had to find a new theme and installed it and tried my best to make it as similar as possible to my old WordPress. To be honest, I am no visual girl, so you may find my design a little bit tacky or whatever, but I did try my best, you know?
Fourthly, I decided to use catriscode.com as my homepage, not catriscode.com/wp, so I had to make a few changes. I had no knowledge about this prior, so I had to google around and read some tutorial articles. This article, How do I move WordPress from a subdirectory to the root directory? helped with that.
To be honest, it took me a while to understand what was going on. I made a few mistakes and even made my website down, but luckily I have had a backup on Softaculous so I could revert back to it again. Seriously though, if you still don’t understand a lot of things like I did, don’t forget to make backups each time you want to make a change. You will thank yourself later!
Fifthly, you need to change your nameservers. I went to my domain registrar and changed the previous nameservers belonging to WordPress to the ones provided by my hosting. I followed this tutorial by Porkbun to do so. This process could take a while to be completed. To make sure that things are actually working, you can use websites such as whatsmydns.net to see if all of your DNS Records (A, AAAA, CNAME, NS, etc) are working.
Lastly, all you need to do now is wait until your DNS propagation process is completed. They say it could take as long as 48 hours for it to be done. Once you get all green check marks on the map around the world, then you’re good to go.
BONUS – Cloudflare CDN
If you have completed all the steps above, another step that I suggest you do is create CDN with Cloudflare. Content Delivery Network (CDN) isn’t really necessary if your website is accessed from the same country as your hosting location, but if your website visitors are from around the world, then yes you should set up a CDN. Luckily, Cloudflare provides this service for free. There are the paid plans too, but if your website isn’t that big, then the free plan should be enough.
There are already plenty of tutorials to do this, so I won’t be talking too much about it here. What you need to do basically is create an account on Cloudflare and enter your domain. Cloudflare will ask you to change your nameservers to theirs and you’ll need another 48 hours for it to be completed. Once it’s completed you will notice a speed bump on your website.
I suggest you check your website speed before and after Cloudflare CDN with websites like the following: testmysite.io, pagespeed.web.dev, and web.dev/measure. I found a nice improvement on my website speed and measurement thanks to Cloudflare CDN.
There are still a lot of things I don’t understand, and there also might be some things I got wrong here. But I think this is already such a long article, and I don’t want to complicate it further. I hope you find something useful from this. Thanks for reading!