How To Host WordPress On Google Cloud

A WordPress site can be running on Google Cloud in minutes. Running it responsibly takes a little more work: you need a stable address, a domain, HTTPS, backups, and a plan for updates and costs.
Google Cloud Marketplace provides a useful starting point by packaging WordPress with its web server, PHP runtime, and database. This guide walks through that route on Compute Engine, then covers the steps that turn a fresh installation into a usable website.
This guide reflects Google Cloud and WordPress workflows available in 2020; tools, images, pricing, and interfaces may have changed since then.
What You’ll Build
You’ll deploy a single Compute Engine virtual machine (VM) running WordPress and its database. This is a straightforward setup for a blog, portfolio, or modest business website. It is not a highly available architecture: if the VM fails, both the application and database can become unavailable.
Before starting, have the following ready:
- A Google account with access to Google Cloud.
- A project with billing enabled and permission to create resources.
- A domain name and access to its DNS settings, if you want a public production site.
- An administrator email address and a password manager.
Google Cloud is infrastructure, not managed WordPress hosting. Marketplace handles much of the installation, but you remain responsible for maintenance, security, and recovery.
1. Create a Project and Set Up Billing
Open the Google Cloud Console and select or create a project using the project selector. A dedicated project keeps the site’s resources and costs separate from unrelated work.
Link the project to a billing account. Signing in with an account used for G Suite does not automatically configure billing or grant permission to manage cloud resources; those depend on your organization’s settings and assigned roles.
Put cost controls in place first
In the billing area, create a budget and configure alert thresholds. Budget alerts notify you about spending; they do not automatically stop services or cap charges.
Your bill can include:
- VM running time.
- Persistent disk storage and snapshots.
- Network traffic leaving Google Cloud.
- External IP address charges, where applicable.
- Any additional services you enable.
Trial credits may be available to eligible accounts, but do not assume your site will remain free. Review the current estimate and plan for costs after credits expire.
2. Open Compute Engine and Choose a Marketplace Image
From the navigation menu, open Compute Engine → VM instances. Enable the Compute Engine API if prompted, and allow initialization to finish.
Next, open Marketplace and search for WordPress. Several publishers may offer installations, with different operating systems, software layouts, and support arrangements.
Compare the listing’s:
- Included WordPress, PHP, and database versions.
- Publisher documentation and update instructions.
- Estimated infrastructure costs and any software fees.
- Backup and HTTPS guidance.
Choose a maintained single-VM deployment and select Launch on Compute Engine, or the equivalent action shown in the listing.
Practical tip: Save the publisher’s documentation. File paths, service commands, and certificate tools differ between images. Instructions for a standard Ubuntu installation may not apply to a packaged Bitnami stack.
3. Configure the WordPress Deployment
Give the deployment a recognizable name, such as wordpress-production. Complete the fields presented by your selected image.
Select a zone near your visitors
A zone is a deployment location within a Google Cloud region. Choose one near your expected audience, while considering pricing and any data-location requirements.
Zone selection can affect latency and availability options. It does not configure your firewall or make hosting free.
Size the VM and disk sensibly
Start with a small general-purpose VM that meets the image’s requirements. Avoid choosing the smallest possible machine simply because it is inexpensive: WordPress, PHP, and the database share its memory and CPU.
An SSD persistent disk is a reasonable choice for a responsive WordPress installation, particularly for database activity. It costs more than standard persistent storage, so check the estimate. Allocate room for uploads, updates, logs, and temporary files, not just the initial installation.
Configure access and administrator details
Enter an administrator email address you control. If the deployment offers HTTP and HTTPS access options, enable them for a public website.
These options usually configure network access, not encryption. Opening port 443 does not install a valid TLS certificate.
Leave phpMyAdmin disabled unless you specifically need it. It is not required to run WordPress. If installed, restrict access through the publisher’s documented secure method rather than exposing a database administration interface publicly.
Do not open the database port to the internet. On this architecture, WordPress and the database communicate locally.
4. Deploy and Confirm WordPress Works
Review the configuration and estimated cost, then click Deploy. Provisioning can take several minutes.
When deployment finishes, record the VM name, external IP address, administrator username, and the documented location of the initial password. Store credentials in your password manager, not in shared notes or source control.
Visit the external IP address in a browser to confirm that WordPress loads. Use the supplied administration link, typically ending in /wp-admin, to check the dashboard.
Avoid submitting sensitive information over plain HTTP. Set up HTTPS before routine administration or publishing.
If the page does not load
Check these items before creating another deployment:
- Confirm that the VM is running and startup tasks have completed.
- Verify that the external IP matches the address you opened.
- Check that an applicable firewall rule allows TCP port 80.
- Confirm that the rule targets this VM, through the appropriate tags or other targeting settings.
- Review deployment output and use browser-based SSH to inspect the server with the publisher’s troubleshooting instructions.
Duplicate deployments create extra costs and often leave the original problem unexplained.
5. Reserve a Static IP and Connect Your Domain
An ephemeral external IP can change when a VM is stopped and started. Before pointing your domain at the site, reserve a static external IP.
In the console’s External IP addresses area, find the VM’s address and promote it to static where that option is available. Otherwise, reserve a regional static address compatible with the VM and attach it to the correct network interface.
At your DNS provider, create records similar to:
Type Name Value
A @ YOUR_STATIC_IP
CNAME www example.com
Replace the placeholder with your actual IP and example.com with your domain. DNS providers vary: some use a blank name rather than @ for the root domain.
Remove conflicting records. In particular, an old AAAA record can send IPv6-capable visitors to a different server.
Check resolution from a terminal:
dig +short example.com A
dig +short www.example.com
Wait until both hostnames resolve as intended before requesting certificates. Pick either the root domain or www as your preferred address and redirect the other consistently.
6. Enable HTTPS and Set the WordPress URL
Use the certificate procedure supported by your Marketplace image. Let’s Encrypt is a common choice, but the installation method depends on the web server and stack layout.
For a compatible Bitnami image that includes its HTTPS configuration tool, the documented command may be:
sudo /opt/bitnami/bncert-tool
Run this only if your image documentation confirms support. It is not a universal WordPress command. Other images may use Certbot or a different procedure.
Before requesting a certificate, confirm that:
- The domain resolves to this VM.
- Required validation traffic can reach the server, commonly over port 80.
- Port 443 is allowed for HTTPS visitors.
- Every requested hostname, including
www, is configured correctly.
After the certificate is installed, test HTTPS and HTTP-to-HTTPS redirects. Verify that automatic certificate renewal is configured rather than assuming installation guarantees renewal.
Update WordPress carefully
Set WordPress Address and Site Address to the intended HTTPS URL under Settings → General, where editable. Some images define these values in configuration files or provide their own domain-change procedure; follow that procedure instead.
Take a backup before changing URLs. Incorrect values can make the dashboard inaccessible. If pages still reference the original IP address or HTTP URLs, use a WordPress-aware migration tool that handles serialized data. Avoid blanket SQL replacements.
7. Secure and Prepare the Site
Once HTTPS is working, change temporary credentials and review administrator accounts. Give contributors only the permissions they need.
Before launch:
- Update WordPress, plugins, and themes after checking compatibility.
- Remove unused plugins and themes.
- Configure readable permalinks and test a sample post.
- Check whether search-engine indexing is discouraged, and disable that setting when ready for discovery.
- Test contact forms, uploads, and password-reset emails.
- Restrict SSH access and protect Google Cloud accounts with multifactor authentication.
Email deserves particular attention. A VM-hosted site may not reliably deliver messages through PHP’s default mail function, and Google Cloud restricts some outbound SMTP traffic. Configure an authenticated email provider using a supported port or API, then test delivery.
8. Back Up, Monitor, and Maintain
A complete WordPress backup includes both the database and files, especially uploads, themes, plugins, and configuration.
Use a backup method that creates consistent database exports and stores copies away from the VM. Persistent disk snapshots are useful, but snapshots of a running database require care; use the database or image publisher’s recommended consistency procedure.
Test restoration to a separate environment. A successful backup notification is not proof that you can recover the site.
Monitor uptime, CPU, available memory, disk usage, and application errors. Some guest-level metrics require an agent. Review billing regularly and schedule maintenance for operating-system and application updates.
Caching can reduce server load, but exclude login, checkout, account, and other personalized pages. Resize based on observed bottlenecks rather than guessing.
Optional: Add a Chatbot or TensorFlow Integration
Neither TensorFlow nor a chatbot is required to host WordPress. Treat them as separate application features after the site is stable.
For a chatbot, a provider’s supported plugin or embedded widget may be sufficient. A custom TensorFlow-backed feature generally belongs behind a separate API, not inside the WordPress PHP process.
Keep service credentials on the server, authenticate requests, apply rate limits, and consider what visitor data leaves your site. Avoid running heavy model inference on the same small VM as WordPress and its database without testing resource demands.
Takeaway
Marketplace makes installation convenient, but deployment is only the beginning. A production-ready WordPress site needs a static IP, correct DNS, HTTPS, restricted access, tested backups, and ongoing maintenance. Complete those foundations before adding optional integrations, and remember that stopping a VM does not remove disks, snapshots, or other billable resources.
Conversation (0)
No comments yet. Start the conversation.
Join the conversation
Create a free member account to comment.