How to host wordpress free with free SSL
- Free WordPress hosting in GCP
- Launch WordPress VM in GCP
- How to install Free SSL Certificate for your wordpress setup
Once you have claimed your free credit in GCP Console, now is the time to launch the wordpress VM.
First, you have to create a project, if you have not already created it. A GCP project is logical container for all your cloud resources related to one project. It helps in easier billing and managing resources. So if you have multiple different ideas, you should create a project for each one of them.
Give your project a new name. Project id is unique throughout GCP. so GCP will automatically will create one unique name as shown in image (balmy-outcome-267304). But you can edit and give your own id also. GCP will check if it’s unique or not. For example, you can say “coding-sessions-wordpress-2020”. Project Id will be helpful while managing your resources through GCP SDK on your local machine.
Once you have created a project and inside it, Click on left menu and go to Market place. Find “WordPress” in marketplace. Most of times, you don’t need to search it, it will be in one of the top lists. Make sure you are selecting “WordPress” image by Google Click to deploy.
In next step, select “Launch on Compute Engine”. Next it will show you configuration options for Compute Engine VM you are going to launch.
- Give your deployment vm a name you can easily identify. e.g. “my-wordpress”.
- If you are using Google Free tier (not free credit), then in zone, make sure you are selecting zone which is mentioned for always free f1-micro instance. (Check previous post in this series for details).
- Make sure to select f1-micro in machine type (0.6 GB memory).
- Provide your email address which will be used for admin login in wordpress.
- Select Install phpMyAdmin.
- If you want faster performance, change boot disk to SSD, Default is HDD.
- In firewall rules, make sure both “http and https” are selected (allowed). Many times we have seen that even if you select these, you have enable them again after vm launch.
- Click deploy to start the vm. It will take few seconds to a minute for launch.
After the launch is successful, GCP console will provide login details with generated passwords as shown below.
Change MySQL password
Click on phpmyadmin link given in Suggested next steps, it will open in new tab.
Login using MySQL root user and password provided. After login, there is “Change password” button in General Settings. Click and change your password.
Change WordPress Admin password
Click on the admin url given, login using the email address you gave during deployment or “admin” user and password given.
After login, go to Users in left menu, select “admin” user from list. On the admin profile page, go to the bottom, in account management section, select “Generate Password” and create a new password. After that, you can use new password for your wordpress admin login. After this, you can do all your wordpress stuff like theme management, add-update plugins and start writing.
Next we will see how to install free SSL certificate on your new wordpress setup, this will help in valid https access to your site and won’t show error in user’s browsers.