<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tohid Azimi</title>
    <description>The latest articles on DEV Community by Tohid Azimi (@tohid_).</description>
    <link>https://dev.to/tohid_</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3575134%2F9dae828e-7840-4baa-b60a-e1328cbd4dfb.jpg</url>
      <title>DEV Community: Tohid Azimi</title>
      <link>https://dev.to/tohid_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tohid_"/>
    <language>en</language>
    <item>
      <title>How I Deployed WordPress on GCP Cloud Run for 30-60% Cheaper Than Managed Hosting</title>
      <dc:creator>Tohid Azimi</dc:creator>
      <pubDate>Mon, 20 Oct 2025 10:06:32 +0000</pubDate>
      <link>https://dev.to/tohid_/how-i-deployed-wordpress-on-gcp-cloud-run-for-30-60-cheaper-than-managed-hostin-178c</link>
      <guid>https://dev.to/tohid_/how-i-deployed-wordpress-on-gcp-cloud-run-for-30-60-cheaper-than-managed-hostin-178c</guid>
      <description>&lt;p&gt;I was thinking about hosting my personal blog. When researching WordPress hosting options, WP Engine and Kinsta immediately stood out—but at $50-83/month for basic plans.&lt;/p&gt;

&lt;p&gt;As a cloud platform engineer mostly working with Google Cloud, I thought there had to be a more cost-effective way. After some research and building, I put together a solution that costs around $30-35/month for typical usage.&lt;/p&gt;

&lt;p&gt;I've made the complete infrastructure open source on &lt;a href="https://github.com/tohidsmart/serverless-wordpress-gcp" rel="noopener noreferrer"&gt;GitHub &lt;/a&gt; in case it's useful for others.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem I Was Trying to Solve
&lt;/h2&gt;

&lt;p&gt;Creating a temporary WordPress site is easy, but running a live website needs reliable hosting. When I looked at managed hosting options, I found a few common issues:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Expensive black box hosting:&lt;/strong&gt; You're paying $80+/month but don't really know what's running under the hood. Want to customize something specific? Often not possible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No automated scaling:&lt;/strong&gt; If your site gets a traffic spike, you either pay to upgrade to handle the peak (even when traffic is normal), or your site slows down.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inflexible plans:&lt;/strong&gt; What if your business needs change quickly? What if you're at 72K visits on a 75K-visit plan? You're forced to upgrade to the next tier even though you only need slightly more capacity—and most of those new resources sit unused.&lt;/p&gt;

&lt;p&gt;For non-technical users, managed hosting makes total sense. But if you're comfortable with some cloud basics and want more control, there should be a middle ground.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Found in Existing Open Source Solutions
&lt;/h2&gt;

&lt;p&gt;Before building, I looked at existing WordPress-on-GCP projects. They had some pieces but not everything I was looking for:&lt;/p&gt;

&lt;h3&gt;
  
  
  Google's Official WordPress on Cloud Run
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/GoogleCloudPlatform/deploystack-wordpress-on-cloudrun" rel="noopener noreferrer"&gt;deploystack-wordpress-on-cloudrun&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Uses VPC Serverless Connector (which is being deprecated and costs more)&lt;/li&gt;
&lt;li&gt;Doesn't show how media files (images/videos) are stored when Cloud Run scales&lt;/li&gt;
&lt;li&gt;No clear credential management for database passwords&lt;/li&gt;
&lt;li&gt;No built-in budget or cost monitoring&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Serverless WordPress on Vercel/Netlify
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; &lt;a href="https://serverlesswp.com/" rel="noopener noreferrer"&gt;serverlesswp.com&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No Infrastructure as Code setup for reproducible deployments&lt;/li&gt;
&lt;li&gt;Doesn't include cost comparisons&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  AWS Serverless WordPress
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/MikletNg/aws-serverless-wordpress" rel="noopener noreferrer"&gt;aws-serverless-wordpress&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Setup requires multiple manual steps&lt;/li&gt;
&lt;li&gt;Doesn't include cost comparisons&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What I wanted was something that combined Infrastructure as Code, proper credential management, cost monitoring, and automated media storage—all in one deployable package.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I put together a WordPress deployment on Google Cloud Run with these components:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cloud Run:&lt;/strong&gt; Serverless WordPress containers that scale based on traffic&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Cloud SQL:&lt;/strong&gt; MySQL database with private IP&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Cloud Storage:&lt;/strong&gt; Storage for WordPress media files&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Secret Manager:&lt;/strong&gt; Secure storage for database and admin passwords&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Terraform:&lt;/strong&gt; Infrastructure as Code so the setup is reproducible&lt;br&gt;&lt;br&gt;
&lt;strong&gt;One-command deployment:&lt;/strong&gt; A script that handles the setup&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faq6qpxwacgm6l93xv3eg.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faq6qpxwacgm6l93xv3eg.jpg" alt=" " width="800" height="735"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Current cost:&lt;/strong&gt; Around $30-35/month for typical small business traffic&lt;/p&gt;

&lt;h3&gt;
  
  
  Why this setup:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pay for what you use:&lt;/strong&gt; Cloud Run scales to zero when there's no traffic&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No vendor lock-in:&lt;/strong&gt; It's your infrastructure, you can modify or move it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reproducible:&lt;/strong&gt; The Terraform code means you can deploy the same setup anywhere&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost monitoring:&lt;/strong&gt; Budget alerts built in so you don't get surprised&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Compared to WP Engine at $50-83/month for similar traffic levels.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Serverless (Cloud Run) Over Traditional VMs?
&lt;/h2&gt;

&lt;p&gt;I considered using traditional VM-based hosting. Here's why I went with serverless:&lt;/p&gt;

&lt;h3&gt;
  
  
  Traditional VMs
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Fixed costs:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pay 24/7 even with zero traffic&lt;/li&gt;
&lt;li&gt;Over-provision for peak traffic&lt;/li&gt;
&lt;li&gt;Underutilized resources most of the time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Manual scaling:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add more VMs manually&lt;/li&gt;
&lt;li&gt;Configure load balancers&lt;/li&gt;
&lt;li&gt;Manage OS updates and security patches&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Operational overhead:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Server maintenance&lt;/li&gt;
&lt;li&gt;Monitoring and alerting setup&lt;/li&gt;
&lt;li&gt;Backup management&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cost for typical blog:&lt;/strong&gt; $50-100/month minimum&lt;/p&gt;

&lt;h3&gt;
  
  
  Cloud Run (Serverless)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Variable costs:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pay only when handling requests&lt;/li&gt;
&lt;li&gt;Zero traffic = $0 compute cost&lt;/li&gt;
&lt;li&gt;Scale automatically from 0 to thousands&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Zero maintenance:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No OS to patch&lt;/li&gt;
&lt;li&gt;No servers to manage&lt;/li&gt;
&lt;li&gt;Google handles infrastructure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Built-in features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automatic HTTPS&lt;/li&gt;
&lt;li&gt;Blue-green deployments&lt;/li&gt;
&lt;li&gt;Request logging&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cost for typical blog:&lt;/strong&gt; $9-30/month (70% savings)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Trade-off:&lt;/strong&gt; Cold starts (~2-5 seconds for first request after idle period). For blogs and business sites with variable traffic, this is acceptable. For high-traffic always-on applications, consider keeping min instances at 1.&lt;/p&gt;




&lt;h2&gt;
  
  
  Cost Breakdown
&lt;/h2&gt;

&lt;p&gt;Here's what this actually costs for a typical small business site with moderate traffic:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Details&lt;/th&gt;
&lt;th&gt;Monthly Cost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Run&lt;/td&gt;
&lt;td&gt;2 vCPU, 2GB RAM&lt;/td&gt;
&lt;td&gt;~$24&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud SQL&lt;/td&gt;
&lt;td&gt;db-f1-micro (0.6GB RAM)&lt;/td&gt;
&lt;td&gt;~$10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Storage&lt;/td&gt;
&lt;td&gt;10GB media storage&lt;/td&gt;
&lt;td&gt;~$0.60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Artifact Registry&lt;/td&gt;
&lt;td&gt;Container images&lt;/td&gt;
&lt;td&gt;~$0.95&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Secret Manager&lt;/td&gt;
&lt;td&gt;3 secrets&lt;/td&gt;
&lt;td&gt;$0 (free tier)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$35/month&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In comparison, managed hosting basic plans:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;WP Engine:&lt;/strong&gt; $59/month&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kinsta:&lt;/strong&gt; $50/month&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; I haven't fully load-tested all configurations yet, so these numbers are estimates based on my current usage. Your actual costs will vary depending on your traffic patterns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bonus:&lt;/strong&gt; New Google Cloud accounts get $300 in free credits valid for 90 days. At $35/month, that covers your first 3 months essentially free.&lt;/p&gt;




&lt;h2&gt;
  
  
  What You're Trading Off
&lt;/h2&gt;

&lt;p&gt;To be honest about what you're giving up with this approach:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You manage WordPress updates yourself:&lt;/strong&gt; No automatic updates for WordPress core or plugins. You'll need to do this manually through the WordPress admin (takes about 10 minutes a month).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No 24/7 WordPress support:&lt;/strong&gt; If something breaks, you're troubleshooting it yourself or asking in GitHub discussions/Stack Overflow. Managed hosts have dedicated WordPress experts on call.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requires basic cloud knowledge:&lt;/strong&gt; You need to understand concepts like projects, services, and billing. If you've never used a cloud provider before, there's a learning curve.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cold starts:&lt;/strong&gt; After your site has been idle, the first request takes 2-5 seconds while the container warms up. Subsequent requests are fast. You can keep one instance always running for an extra ~$10/month if this matters.&lt;/p&gt;




&lt;h2&gt;
  
  
  Who This Is For (And Who It's Not For)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  This might work well for you if:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You're spending $500-2,000/year on WordPress hosting and want to cut costs&lt;/li&gt;
&lt;li&gt;You're comfortable with terminal commands and following technical documentation&lt;/li&gt;
&lt;li&gt;You're okay managing your own WordPress updates&lt;/li&gt;
&lt;li&gt;You want to learn Infrastructure as Code&lt;/li&gt;
&lt;li&gt;You're a developer or agency managing multiple client sites&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  This probably isn't for you if:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You have zero technical experience (never used terminal/command line)&lt;/li&gt;
&lt;li&gt;You need 24/7 WordPress-specific support&lt;/li&gt;
&lt;li&gt;You want someone else to handle everything&lt;/li&gt;
&lt;li&gt;Your site needs guaranteed sub-100ms response times&lt;/li&gt;
&lt;li&gt;You need WordPress multisite (not supported yet)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why I'm Open Sourcing This
&lt;/h2&gt;

&lt;p&gt;A few reasons:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get feedback:&lt;/strong&gt; I don't know if this actually solves problems for others until people try it and tell me what's missing or broken.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learn from others:&lt;/strong&gt; Someone will probably find bugs I missed or think of features I didn't consider.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Give back:&lt;/strong&gt; I've benefited from open source projects for years. Seems fair to contribute something back.&lt;/p&gt;

&lt;p&gt;The code is free to use. If people find it useful and want help with custom setups or migrations.&lt;/p&gt;




&lt;h2&gt;
  
  
  Future Plans
&lt;/h2&gt;

&lt;p&gt;Depending on community feedback and interest, I'm thinking about adding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;FinOps support:&lt;/strong&gt; Better cost tracking and optimization recommendations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Governance and compliance:&lt;/strong&gt; GDPR toolkit, audit logging improvements&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Content Delivery Integration:&lt;/strong&gt; Cloud CDN setup for faster global delivery&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom domain automation:&lt;/strong&gt; Simpler process for mapping your own domain&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-site support:&lt;/strong&gt; WordPress multisite configurations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have other ideas or needs, let me know in the GitHub discussions.&lt;/p&gt;




&lt;h2&gt;
  
  
  Get Started
&lt;/h2&gt;

&lt;p&gt;The complete code and documentation are on GitHub:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://github.com/tohidsmart/serverless-wordpress-gcp" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's included:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Full Terraform infrastructure code&lt;/li&gt;
&lt;li&gt;One-command deployment script&lt;/li&gt;
&lt;li&gt;Documentation&lt;/li&gt;
&lt;li&gt;Cost estimation tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites:&lt;/strong&gt; Google Cloud account and basic familiarity with terminal/command line.&lt;/p&gt;




&lt;h2&gt;
  
  
  Questions &amp;amp; Community
&lt;/h2&gt;

&lt;p&gt;Have questions? Want to contribute?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;💬 &lt;strong&gt;GitHub Discussions:&lt;/strong&gt; &lt;a href="https://github.com/tohidsmart/serverless-wordpress-gcp/discussions" rel="noopener noreferrer"&gt;Ask anything&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🐛 &lt;strong&gt;Report Issues:&lt;/strong&gt; &lt;a href="https://github.com/tohidsmart/serverless-wordpress-gcp/issues" rel="noopener noreferrer"&gt;GitHub Issues&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;I built this because I wanted cheaper WordPress hosting with more control. After some evenings and weekends, I have something that costs around $30-35/month instead of $50-83/month, and I can modify it however I want.&lt;/p&gt;

&lt;p&gt;It's not perfect—there are definitely rough edges and things I haven't fully tested yet. But if you're technical enough to follow deployment instructions and comfortable managing your own WordPress updates, this might save you some money.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is this useful? Missing something important?&lt;/strong&gt; I'd love to hear feedback in the GitHub discussions or in the comments section.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you found this helpful, star the repo or share it with someone who might benefit.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>googlecloud</category>
      <category>serverless</category>
      <category>infrastructureascode</category>
    </item>
  </channel>
</rss>
