Migrate WordPress site to another hosting service.

Introduction
This article details the migration of WordPress site (exactly this site you are now on) from one service provider to Amazon Lightsail.
There might be various reason to do that (mine is outlined below) but in general I hope to share the message that especially with WordPress, migration can be done easy and within few hours.

I have been hosting this website for a years now. Primarily I was using the same product (called basic) of the same provider with which I was satisfied. The fee was reasonably small which perfectly aligning with my equally small expectations. The site was stable and reasonably fast. All goes smoothly, so you can imagine my surprise when I got my proforma invoice this year with was 18 times higher than before (I man, really 18X). I quickly calculated, that for the same amount of money I could easy get 4vCPU and 8GB RAM VM instance in Azure or AWS with no problem. I didn’t want to spend too much time searching new service and handling the migration, even though migration is part of my daily work.

There are many WordPress hosting services available online. When choosing one, it is important to consider the total cost over the next few years. As my experience shows, you can’t entirely certain. Usually promotions prices are only for the first year, and then the price jumps few times. Considering all this, Amazon LIghtsail seemed a reasonable choice for me, 5$ for 2vCPU, 512MB RAM, 20GB SSD and 1TB Transfer. What particularly dawn me was the automation. Web services (like WordPress) already preinstalled and (almost) ready to use. Easy web configuration, complete end-to-end process nicely packed (read below). Also 3 mths for free for testing.

For WordPress I used UpdraftPlus Backup:Restore plugin (free version) to do backup dump and restoration (in Amazon this time).

Amazon Lightsail
This article do not intended to be an advertisement of Amazon Lightsail, but still as this is the destination here are a few details about the service:

  1. the cheapest option is based on offer with linux with ipv6 (without static ipv4) – pricing offer
  2. there is 3 months free option for testing, after the price should not change after a year or so (unless … prace will change for all)
  3. the following prepared images (blueprints) are ready to use with linux
  4. ready to use automation for Let’s Encrypt site certification

Service deployment

  • Create new account or login to https://lightsail.aws.amazon.com
  • Create an instance (means deploy new service) where you can choose between the blueprint option, network time (IPv6-only instance can be create just for some blueprint)
  • Select the size and naming and region (looks like the price is equal everywhere)

    Deployment can take few minutes. After that you will need to two users. One for Linux OS. The second one for WordPress admin user (admin management site) which can be easily retrieved from the instances main site (in the table where IP addresses are visible – main site)
    Access to linux can be via SSH (you can obtain SSH key from the Instances -> Connect tab) or via web
  1. Go to the “Domain & DNS” tab and register your domain (or create new DNS zone). Take note of Name servers that has to be defined where your domain is registered.
  2. Assign that domain to your website (together with static IP)
  3. Add NS record to your DNS records minimum with www.yourdomain pointed to yourdomain
  4. After a while (may be longer while) your site should be visible with the domain name

Adding SSL certificates

Before proceeding, it is recommended to create snapshot of your instance (snapshot page at your instance)

Follow the documentation Secure your WordPress site with HTTPS on Lightsail when possible (or alternatively Secure your Lightsail WordPress instance with free Let’s Encrypt SSL certificates)
In short, you should login to your server (via ssh) and run the command sudo /opt/bitnami/bncert-tool and follow the instructions. Be sure to provide your domain name and its www variant when prompted.

WordPress data migration

As mentioned already, I used the free version of UpdraftPlus Backup which is quite powerful. Backups are done separately for database, plugins, themes, uploads (which can be large) and others. The only issue I encountered was with the downloads/uploads of uploads. I had to export and import that file several times until worked. Other than that there were a warnings around never php version installed by default on the Lightsail.

Observations

Amazon Lightsail is based on Bitnami (https://en.wikipedia.org/wiki/Bitnami). The same services that are available for VMware Automation (and were long time in VMware offers). There are solid prepared images, well tested and ready to use. That only visualise how IT world is “small” and you will never know where you can use your skills.

References

[1] Amazon Lightsail or Amazon EC2?
[2] Verify IPv6 reachability for Lightsail instances
[3] Configure IPv6-only networking for Lightsail instances
[4] Secure your WordPress site with HTTPS on Lightsail
[5] Secure your Lightsail WordPress instance with free Let’s Encrypt SSL certificates

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Free(BSD)
yt-dlp – download your data from youtube

Hi, this short article only to mention that there is a wonderful application that exists for a years for the purpose to download YOUR or maybe some other movies from youtube. I don’t want to go in to legal aspect too much, what can be downloaded from youtube, what not …

VMware
VMware Workstation and Fusion can be installed and use for free (even for the enterprise)

For a while now, the VMware Workstation (and Fusion for MacOS) can be used without any additional fee for Personal use. That was a great Broadcom news and nice gesture from that software vendor. Recently Broadcom announced that the software will be available for all, even the commercial sector. This …

Free(BSD)
Convert pdf file to jpeg – with imagemagic

Short article just to write down not-so frequently (for me) task: remove /opt/homebrew/bin from that command where using on other system than macOs Options: cheers