Skip to content
Hosting

How to Set Up a VPS for WordPress and WooCommerce

When a VPS makes sense for WordPress or WooCommerce, how to size it, the stack and settings that matter, and how to test your own store under load.

By Tremhost Experts Updated November 5, 2026 4 min read

A VPS for WordPress or WooCommerce makes sense when shared hosting runs out of resources, or when you need control over caching, PHP workers and the database. The setup that matters most is a fast web server with full-page caching, a current PHP version with OPcache, an object cache such as Redis, a tuned database and real backups, with cart and checkout pages kept out of the page cache. This guide covers sizing, a practical setup and how to test your own server rather than trusting generic numbers.

Do you need a VPS at all?

Many WordPress sites run well on good shared or managed WordPress hosting. Consider a VPS when:

  • Your hosting control panel shows you regularly hitting CPU, memory or process limits.
  • WooCommerce cart and checkout slow down at busy times even with caching on.
  • You need software the shared plan cannot run, such as your own Redis instance or custom PHP settings.
  • You host several busy sites and want reserved resources.

If you would rather not manage a server, managed WordPress hosting handles updates, backups and security for you, from $15 a month at Tremhost.

Sizing: start sensibly, then measure

There is no universal answer, because themes, plugins and traffic patterns vary so much. Use these principles:

  • RAM is usually the first limit. PHP workers, the database buffer pool, Redis and a control panel all use memory. A control panel adds its own baseline use.
  • Dynamic pages drive CPU. Cached pages are cheap to serve; cart, checkout, account pages and admin work run PHP and database queries every time.
  • Leave headroom. Size for your busiest hour, not an average day, and keep free disk space for logs, backups and snapshots.
  • Start one step smaller only if you can upgrade easily, and measure before deciding.

As reference points, Tremhost KVM plans include KVM 2 with 4 dedicated cores and 4 GB RAM at $18 a month, KVM 4 with 6 cores and 8 GB at $25, and KVM 5 with 6 cores and 16 GB at $30, all on NVMe storage.

A practical WordPress and WooCommerce stack

Core components

  • Web server and page cache: LiteSpeed with LSCache, or NGINX with FastCGI cache.
  • PHP: a currently supported version with OPcache enabled.
  • Object cache: Redis, to reduce repeated database queries.
  • Database: a current MariaDB or MySQL release, with the buffer pool sized to fit your data in memory where possible.
  • TLS: HTTPS with TLS 1.3 and HTTP/2 or HTTP/3.
  • Storage: NVMe, so database reads and writes are not the bottleneck.

Settings that matter

  1. Turn on full-page caching for public pages.
  2. Exclude cart, checkout and my-account pages, and respect WooCommerce session cookies, so customers never see someone else’s basket.
  3. Enable the Redis object cache.
  4. Replace WordPress’s built-in pseudo-cron with a real system cron job running every few minutes, so scheduled tasks do not depend on visitors.
  5. Set PHP worker counts to fit your RAM, so the server does not swap under load.
  6. Send order and notification emails through an authenticated SMTP or transactional email service, with SPF, DKIM and DMARC in place.

Security basics

  • Keep WordPress, themes and plugins updated, and remove unused ones.
  • Use two-factor authentication for admin accounts.
  • Rate-limit the login page and restrict XML-RPC if you do not use it.
  • Put a web application firewall in front of the site, such as Cloudflare.
  • Configure a firewall on the server and disable password logins for SSH in favour of keys.

Backups

Run daily backups off-peak and store copies away from the server. Take a snapshot before major updates. Test a restore regularly: a backup you have never restored is untested.

How to test your own server

Generic benchmark tables tell you little about your site. Test your actual store:

  1. Cached scenario: load test the home page and category pages with the cache warm.
  2. Dynamic scenario: script a journey from product page to add-to-cart, cart and checkout, without page caching.
  3. Increase load in steps using a load-testing tool such as k6 or a hosted load tester, against a staging copy or during a quiet period.
  4. Watch the server: response times at the 95th percentile, CPU use, memory and swap, disk wait and database slow queries.
  5. Record where response times start to climb. That is your practical capacity.

Upgrade or split?

Upgrade the VPS when, at peak, CPU stays high, memory is full and the server is swapping, or response times keep rising despite a good cache hit rate.

Move the database to its own server when slow queries dominate while the web server has spare CPU, or when imports and reports slow down the shop front.

Unmanaged or managed?

Tremhost’s KVM VPS plans are unmanaged: dedicated cores, full root access and NVMe storage, from $15 a month, in Johannesburg, New York, Miami, Limburg or Roubaix. If you want cPanel, LiteSpeed, CloudLinux, Imunify360 and backups run for you, a managed cPanel VPS starts at $80 a month and includes free migration.

Frequently asked questions

Is LiteSpeed or NGINX better for WordPress?

Both work well. LiteSpeed with LSCache is quick to set up for WordPress; NGINX with FastCGI cache suits people who prefer manual configuration.

Do I need Redis?

For WooCommerce and plugin-heavy sites it usually helps, because it cuts repeated database queries. Measure before and after.

Can a VPS run several WordPress sites?

Yes. A control panel such as cPanel makes managing several sites, their email and SSL much easier.

Next step

Pick a server size and location on the Tremhost VPS hosting page, or ask on WhatsApp on +263 73 563 9917, Monday to Friday, 08:00 to 17:00 CAT, which option fits your store.

Ask us on WhatsApp