HanG321 Blog

Google Cloud Platform Compute Engine send email

recently migrated wordpress to GCP, using cloud launcher – wordpress by bitnami.  That pretty easy, google other tutorials and follow it. e.g.

 

Set up

here is some highlighted procedures

1. create compute engine via clound launcher

2. create cloud SQL
– db username and password

3. mysqldump old wordpress database

4. load into cloud SQL

5. change wordpress setting.
$ cd apps/wordpress/htdocs/

6. turn off mysql in bitnami image

7. turn off banner

8. setup static IP for compute engine instance & cloud SQL
in cloud SQL, allow CE’s IP

9. change DNS, point to GCP

Issues

outgoing email

a bit weird, quite trouble to setup mailjet https://cloud.google.com/compute/docs/tutorials/sending-mail/
https://cloud.google.com/compute/docs/tutorials/sending-mail/using-mailjet

followed the instructions, yet those postfix setup, from fields is <username>@<hostname>, which MailJet will send a verification email to, and apparently it won’t be verified.
https://app.mailjet.com/account/sender

additional steps to modified the email address, so it passes the verification.
https://www.cyberciti.biz/tips/howto-postfix-masquerade-change-email-mail-address.html

Then, setup wordpress plug-in

https://docs.bitnami.com/google/apps/wordpress/#how-to-configure-outbound-email-settings

php-fpm CPU loading

unknown reason on high CPU usage. To restart php-fpm, or the HTTP server.