1. Create a new project
-
- Go to Console
- Add new project
- Give a name then click create
2. Install WordPress
- Select the new project
- Go to marketplace
- search for WordPress
- Pick WordPress Certified by Bitnami
- Lunch on Compute Engine
3. Configure server
- Choose ram and size based on your website needs
- it’s ok to start with the minimu
- Boot Disk → choose SDD it’s much faster
- Deply
- Save WP IP address and login information on your PC
4. Link your domain
- Click on API and Services
- Click on Enable APIs and Services
- Search for DNS
- Open Google Cloud DNS API and Enable it
- Console → Network Services → Cloud DNS
- Create zone, Host name is the domain name
- Add record Set
In new tab open console → compute engine → get the external IP address
1. Add record DNS Name empty
2. Type: A,
3. Add the external IP Address
8. Add Another record set
This is for www
- Record DNS Name: www
- Type: CNAME
- Canonical name, the domain without www ex: domian.com
9. Add Google DNS Names to your domain registrar
10. Add these 4 domains provided by Google in the zone you created, it will be something like the for names below
-
-
- ns-cloud-d1.googledomainss.com
- ns-cloud-d2.googledomains.com
- ns-cloud-d3.googledomains.com
- ns-cloud-d4.googledomains.com
-
How to Reserve a Static IP Address on Google Cloud Platform
It will save your website from being down whenever you restart the Apache server, or restart or stop your virtual machine.
- Go to VPC Networking → External IP Addresses
- Change type to static
- Add the name
- Click reserve
Moving The old content to the new WP installation on GCP
On old Host
- Install the Plugin All-in-one migration
- Export the content to your desk
On WP on GCP
- Install the Plugin All-in-one migration
- Upload the exported file from the old server
Note: You might face a problem that the upload maximum size is 40MG and your file is bigger
How to Increase Maximum Upload File Size in WordPress
You can find the solution here:
help.servmask.comThere are 4 ways that you can choose to increase the maximum upload file size in WordPress
1. The Easiest is to use this plugin
Download it https://import.wp-migration.com/
On WP Panel → Add plugin → upload file → chose the downloaded file
2. Update .htaccess file
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300
Change the numbers to the values that you need. The max execution time and max input time values are in seconds and might need to be increased further if your internet connection is slow.
3. Update wp-config.php file
@ini_set( 'upload_max_filesize' , '128M' );
@ini_set( 'post_max_size', '128M');
@ini_set( 'memory_limit', '256M' );
@ini_set( 'max_execution_time', '300' );
@ini_set( 'max_input_time', '300' );
Google Cloud FTP Setup with FileZilla
4. Remove Bitnami banner on WordPress site
The Bitnami info page provides information about the installed application resources as well as useful links to documentation. It is accessible by clicking in the Bitnami banner in the right bottom corner.
In case you want to remove the banner, you will just need to SSH into your machine and then execute the following command:
sudo /opt/bitnami/apps/wordpress/bnconfig –disable_banner 1
Please note that /opt/bitnami is the default installation directory of the Bitnami stack.
Finally, you need to restart Apache.
sudo /opt/bitnami/ctlscript.sh restart apache
You will find more information about the Bitnami banner using the following link: