Skip to content
ExponaBLOG
WORDPRESS DEVELOPMENT & PLUGINS · DAY 061 / 100

Hosting WordPress: a practical guide for developers

Pick the right host.

Expona Admin8 min read

Choosing where to host WordPress feels straightforward until you're running production traffic and suddenly facing downtime, slow queries, or a bill that makes your accountant wince. The hosting decision shapes everything: your deployment workflow, what you can debug easily, and how much time your team spends managing infrastructure instead of building features.

In this practical guide to hosting WordPress, we'll walk through the real trade-offs between managed hosting, VPS, and container setups, then cover the non-negotiable features every production WordPress site needs.

Managed hosting for most sites

Managed WordPress hosting is where most teams should start. Services like Kinsta, WP Engine, and Flywheel handle the server provisioning, PHP version management, security patches, and day-to-day maintenance. You focus on code; they focus on keeping the lights on.

The appeal is genuine. Your deployments typically work via Git push or SFTP, automatic backups run every night, and if something breaks, you contact support rather than SSH-ing into a server at 2 AM. The platform usually handles WordPress-specific concerns: they've tuned PHP, configured caching, hardened security, and optimized database performance.

Real scenario: you're building a Shopify integration for a medium e-commerce site. The managed host already has Redis configured for WooCommerce sessions and product caches. Database replication is automatic. You push code, staging gets updated, and everything works as expected. No DevOps work. You spend three days writing the integration instead of two weeks debugging server configs.

The tradeoff is cost and inflexibility. Managed hosting typically runs $50–300+ per month per site. You can't SSH in and tweak nginx configs. You can't install arbitrary system packages. If you need custom PHP extensions or specific Linux kernel parameters, you're either out of luck or paying premium rates.

Ask managed hosts these questions before committing:

  • Do they offer staging environments and one-click rollbacks?
  • What's the backup retention policy, and can you restore individual tables?
  • Can you scale seamlessly when traffic spikes, or do you hit plan limits?
  • Do they provide SSH access for debugging, or are you locked into their control panel?
  • What's included in support? Do they help with plugin conflicts or only infrastructure issues?

Managed hosting makes sense for agencies building client sites, product companies with a single WordPress install, and teams without dedicated DevOps. The peace of mind is worth the premium for most projects.

VPS for control and cost

Virtual Private Servers from Linode, DigitalOcean, Vultr, or AWS lightsail give you full control at a fraction of managed hosting cost. A 2GB VPS runs $10–20 per month. You get root access, SSH, and permission to install anything. You own the entire stack.

This flexibility is powerful when you need it. You can install custom PHP extensions like Imagick for image processing, add system-level caching with Varnish, or configure specialized monitoring. You can run multiple WordPress sites on one server and share resources efficiently. Cost scales linearly instead of per-site premiums.

But control means responsibility. You're now running your own backups, managing database replication, handling security updates, monitoring disk space, and troubleshooting performance issues. A typical setup looks like this: Ubuntu LTS, Nginx (not Apache), PHP-FPM with multiple worker processes, MySQL or PostgreSQL, Redis for caching, and Fail2Ban for brute-force protection.

Here's a minimal nginx config for a WordPress site on a VPS:

php
server {
    listen 80;
    server_name example.com www.example.com;
    root /var/www/wordpress;
    index index.php;

    # Cache static assets aggressively
    location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|webp)$ {
        expires 365d;
        add_header Cache-Control "public, immutable";
    }

    # Hide sensitive files
    location ~ /\. {
        deny all;
    }

    location ~ /wp-config.php {
        deny all;
    }

    # Route all requests through index.php
    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    # PHP handler
    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
        fastcgi_read_timeout 300;
    }
}

With this setup, you control caching headers, can add custom headers for security, and optimize PHP-FPM worker counts for your traffic patterns. Most managed hosts don't let you touch any of this.

The operational burden is real, though. You need monitoring to alert when CPU, memory, or disk fill up. You need a deployment strategy (Capistrano, Docker, Ansible) to push code safely. You need to test updates before deploying to production. A single misconfiguration can take your site offline.

VPS hosting makes sense when you're cost-conscious, need full control for technical reasons, or managing multiple client sites where shared infrastructure saves money. It requires someone on the team comfortable with Linux administration.

Container setups for agencies

Agencies building dozens of WordPress sites often reach a point where per-site VPS costs add up and manual provisioning becomes untenable. Containerized deployments—typically with Docker and orchestrated by Docker Compose or Kubernetes—let you standardize the platform while deploying hundreds of independent sites.

The pattern: you build a Docker image containing WordPress, Nginx, PHP-FPM, and your agency's standard plugins. Then you instantiate that image for each client with different environment variables and database connections. Deployments become immutable: if the image works locally, it works in production.

A simple Docker Compose setup for a WordPress site:

php
version: '3.9'

services:
  db:
    image: postgres:15-alpine
    environment:
      POSTGRES_DB: wordpress
      POSTGRES_USER: wp_user
      POSTGRES_PASSWORD: ${DB_PASSWORD}
    volumes:
      - db_data:/var/lib/postgresql/data
    restart: unless-stopped

  wordpress:
    build: .
    ports:
      - "80:80"
    environment:
      DB_HOST: db
      DB_NAME: wordpress
      DB_USER: wp_user
      DB_PASSWORD: ${DB_PASSWORD}
      WP_DEBUG: "false"
      WP_MEMORY_LIMIT: "256M"
    volumes:
      - ./wp-content/plugins:/var/www/html/wp-content/plugins
      - ./wp-content/themes:/var/www/html/wp-content/themes
    depends_on:
      - db
    restart: unless-stopped

  redis:
    image: redis:7-alpine
    restart: unless-stopped

volumes:
  db_data:

Each client gets a predictable, reproducible environment. Your CI/CD pipeline can test, build, and deploy in minutes. Scaling to fifty sites means repeating the same container stack fifty times, not troubleshooting fifty different server configs.

Hosting options for containerized WordPress include AWS ECS (managed container service), DigitalOcean App Platform, or self-hosted Kubernetes on a VPS cluster. For most agencies, managed container platforms remove the Kubernetes complexity while preserving the deployment benefits.

The tradeoff is operational complexity. You need to understand Docker, container registries, orchestration, networking between containers, and volume management. Your team needs to think in terms of containerized applications, not traditional servers.

This approach scales agencies from managing a handful of sites to managing hundreds. It's less relevant for a single WordPress installation.

Look for caching, backups and staging

Regardless of hosting choice, three features separate production-ready hosts from amateur setups: built-in caching, automated backups, and staging environments.

Caching dramatically improves performance. WordPress can be slow: every page load queries the database, runs plugin hooks, and renders HTML. Caching stores rendered pages (or query results) so repeat visitors skip PHP execution entirely. Managed hosts usually include this; on VPS, you install Redis or Memcached and configure WordPress plugins like WP Super Cache or Redis Object Cache to use them.

Check what caching your host provides:

  • Page-level caching (full HTML cache, purged on post updates)
  • Object caching (database query results cached in memory)
  • Opcode caching (PHP bytecode cached to skip recompilation)
  • Static asset caching (images, CSS, JS served from edge CDNs)

Without these layers, a WordPress site serving 1,000 visitors per day can hit response time limits. With proper caching, the same site handles 10,000 visitors comfortably.

Backups are insurance. Hosting should automatically backup your database and files daily, retain at least 7–30 days of backups, and let you restore individual files or entire environments with one click. Test restoration once per quarter; many teams discover their backups are broken only after losing data.

For VPS, automate backups with a tool like duplicator or mysqldump to S3, separate from your primary server. Store offsite backups for at least 30 days.

Staging environments are where you test before pushing to production. You should be able to clone your production database, install a new plugin, test it thoroughly, then either promote the changes or discard them. Managed hosts usually offer this as a button click. On VPS, you manage staging manually (another virtual host on the same server, a separate small instance, or local development mirroring production).

A staging checklist:

  1. Restore production database and uploaded files to staging
  2. Test plugin updates, theme changes, or custom code
  3. Run performance tests (simulate expected traffic)
  4. Check for security issues (vulnerability scanners, code review)
  5. Verify email functionality and third-party integrations
  6. Promote to production or rollback

Common mistakes

We've seen these hosting decisions go sideways repeatedly:

Choosing based purely on price. A $5/month host saves money until your site goes down during peak shopping hours and you lose $10,000 in sales. You get what you pay for. Allocate at least $50–100 per month for hosting if you're running any revenue-generating site.

Not testing backups. Backup features are worthless if they don't restore correctly. Restore a backup to staging monthly. If restoration fails silently, you won't know until disaster strikes.

Skipping staging. Pushing plugin updates directly to production is how sites break. Always test in staging first, even for minor updates.

Ignoring caching. A WordPress site without caching is slow by default. This isn't a feature you add later; build your hosting choice around caching from day one.

Outgrowing your platform suddenly. Plan for growth. If you're at 80% of your host's capacity and traffic is climbing, move now, not during an outage. Migrations during peak traffic are chaotic.

Not understanding what you're paying for. Read your hosting terms carefully. What's included in support? How long are backups retained? Is SSL included? Are there overage charges? Some hosts surprise you with $500 bills for bandwidth overages because you misread the plan.

Key takeaways

  • Managed WordPress hosting is the right choice for most teams: you trade cost for peace of mind and let the provider handle infrastructure.
  • VPS hosting makes sense when you need cost savings, full control, or plan to host multiple sites and can invest in Linux administration.
  • Container setups (Docker, Kubernetes) scale agencies efficiently but require deeper DevOps knowledge and are overkill for single sites.
  • Non-negotiable features: built-in caching, automated offsite backups with restoration testing, and staging environments for safe testing.
  • Don't cheap out on hosting. Choose based on your traffic needs, support requirements, and team expertise, not the lowest price.
  • Test your backup and restore process quarterly; a broken backup is the same as no backup.
  • Plan for growth. Move to a larger platform before you're forced to during an outage.
ShareXLinkedInReddit

Found this useful? Support the writing.

Buy me a coffee
Written by
Expona Admin
Site administrator

Comments

Loading comments…

Leave a comment

Comments are reviewed before they appear. Be kind and stay on topic.

Related articles