Migrate Website to Digital Ocean from Sina App Engine(SAE)

Migrate a WordPress Site from Sina App Engine to DigitalOcean

This note records the migration process I used to move a WordPress website from Sina App Engine (SAE) to a DigitalOcean droplet.

1. Redirect the SAE Domain

Open config.yaml in the SAE website root directory and add the following rule under handle:

- rewrite: if(in_header["host"] ~ "^www.yovisun.me" && path ~ "^(.*)$") goto "http://www.yovisun.com$1 [L,QSA,R=301]"

This redirects requests from the old SAE domain to the new domain with a 301 permanent redirect.

2. Buy or Prepare the New Domain

I bought the new domain on West.cn. After the domain is ready, point its DNS records to the DigitalOcean droplet IP address.

3. Create a DigitalOcean Droplet

Create a droplet on DigitalOcean using the one-click WordPress image. During setup, add an SSH key for login.

Generate an SSH key locally if you do not already have one:

ssh-keygen -t rsa -C "835570372@qq.com"

4. Convert the OpenSSH Private Key for PuTTY

If you use PuTTY on Windows, convert the OpenSSH private key to PuTTY’s .ppk format with PuTTYgen.

  1. Start PuTTYgen.
  2. Click Conversions > Import key.
  3. Select the private key generated by OpenSSH, such as id_rsa.
  4. Click Save private key and save it as something like id_rsa_putty.ppk.

5. Log in to the Droplet with PuTTY

Open PuTTY and enter the droplet IP address or domain name. Then configure the private key:

  1. Go to Connection > SSH > Auth.
  2. Click Browse and select the .ppk private key file.
  3. Return to Session and save the session.
  4. Connect to the server.

On first login, follow the WordPress one-click image setup prompts. In my case, the default settings were acceptable, so I continued by pressing Enter.

6. Configure DNS

Set the DNS records for the domain to the droplet IP address. Create the corresponding records needed by the site, such as A records for the root domain and www subdomain.

After DNS changes, verify the domain resolves to the droplet:

nslookup www.yovisun.com

or:

dig www.yovisun.com

7. Update WordPress

Log in to the new WordPress dashboard and update WordPress, themes, and plugins before importing content. This reduces compatibility problems during migration.

8. Import the XML Backup

Use the pre-exported WordPress .xml backup file:

  1. Open the WordPress dashboard.
  2. Go to Tools > Import.
  3. Choose WordPress.
  4. Install the importer if needed.
  5. Upload the .xml file and run the import.
  6. Assign imported posts to the correct user.
  7. Choose whether to download and import file attachments, depending on whether the old site media URLs are still accessible.

After import, check posts, images, permalinks, and redirects before considering the migration complete.

Leave a Reply