After you’ve installed WordPress and pointed your domain name to Google Cloud, there are additional steps required to configure your domain name so that it works properly with your WordPress website.
In this two-part tutorial, I will show you step-by-step how to change your WordPress settings to point to your new domain name.
It is also recommended that you reserve a static IP address for your WordPress website on Google Cloud before starting this tutorial.
There are 2 options in this tutorial:
- 1. WordPress Bitnami instructions
- 2. WordPress Click-to-deploy instructions
1. WordPress Bitnami instructions
If you’re using the Bitnami version of WordPress on Google Cloud, changing your website URLs via Settings > General is disabled. Instead, you should change your URLs by editing your wp-config.php file.



nano /opt/bitnami/apps/wordpress/htdocs/wp-config.php

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/');
WITH THIS:
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
define('WP_HOME', 'http://www.yourdomain.com/');
define('WP_HOME', 'https://www.yourdomain.com/');

2. WordPress Click-to-deploy instructions
If you’re using the Click-to-Deploy version of WordPress on Google Cloud, you can configure your domain settings directly through your WordPress Dashboard, by going to Settings > General.
In the URL fields, make sure to enter the preferred URL for your website. This can be either www.yourdomain.com or yourdomain.com. The important thing is to choose a preferred version and stick to it.
Also, if you’ve already configured SSL for your website, make sure the domain name you enter is preceeded by https:// instead of http://.

To change your preferred WordPress URLs, navigate from your WordPress dashboard to Settings > General.
Next, make sure to verify your website’s permalink structure. This setting often get corrupted after changing your domain name settings. You can access your permalink settings by going to Settings > Permalinks.

Make sure to verify your permalink structure after changing your domain name settings.
That’s it!
Now that you’ve configured your WordPress domain name on Google Cloud, the next step is to configure an SSL certificate for your website (Bitnami or Click-to-deploy).
If you’ve already configured SSL for your website, then you can take advantage of Cloudflare’s free CDN by following this tutorial here.
If you have any questions or comments, please post them below!
Thanks,
Comments
Post a Comment