Skip to content
Agencei
Demonstrative project

Editorial and brochure websites

Demo project: migrating a WordPress site to a cloud VPS

This project is presented for demonstration purposes: it illustrates how we design and deliver, without corresponding to an identified client.

Context

This demo project reproduces a common situation: a WordPress site on shared hosting that has become slow and hard to evolve, which needs to move to a cloud server under full control. It is not a client project but an environment we maintain to illustrate our method.

The modelled site is an editorial website with several thousand articles, the usual plugins (SEO, forms, caching) and an editorial team that publishes daily and cannot afford a prolonged outage.

The goal is to show how to go from hosting where you control neither the PHP version, nor the cache, nor the backups, to a reproducible, documented and monitored infrastructure.

Problem

On shared hosting, resources are shared and opaque: the site slows down at peak hours, updates are made in production without a test environment and backups depend on the hosting provider.

Migrating without a method risks content loss, broken links, a drop in search rankings and an outage during the DNS switch.

Constraints

  • No loss of content, media or SEO metadata during the migration.
  • Downtime limited to the DNS switch, with the option to fall back to the old hosting.
  • Reproducible infrastructure, so the server or a staging environment can be recreated quickly.
  • Automated, off-site backups that can be restored without complex manual work.
  • Hosting cost comparable to high-end shared hosting.

Architecture

A cloud VPS hosts all services in Docker containers orchestrated with Docker Compose: Nginx at the front, PHP-FPM for WordPress, MariaDB for the database and Redis for the object cache.

Nginx serves static files directly, applies a page cache for anonymous visitors and terminates TLS with automatically renewed Let's Encrypt certificates.

A CDN in front of the server absorbs most of the traffic on media and cached pages and filters malicious requests.

A password-protected staging environment identical to production is used to test WordPress, theme and plugin updates.

A GitHub Actions pipeline deploys the versioned theme and configuration to staging and then to production, and encrypted backups (database and media) are sent every night to external object storage.

Solution

The migration starts with an inventory: PHP version, plugins, scheduled tasks, database and media size, existing URLs and redirects. This inventory is used to prepare the Docker configuration and to identify incompatible or no longer useful plugins.

The site is copied to the new server, first into the staging environment, where rendering, forms, redirects and scheduled tasks are checked page by page. URLs are rewritten cleanly in the database and the Redis object cache is enabled through a dedicated plugin.

On switch day, a final synchronisation of the database and media is performed, the DNS TTL having been lowered beforehand. DNS is then pointed to the CDN and the new server; the old hosting stays in place for a few days to allow a rollback.

After the migration, monitoring (availability, response time, disk space, certificate expiry) is set up and backups are verified through a real restore on the staging environment.

Outcome

  • The infrastructure is reproducible: the full server can be recreated from the Docker Compose files and the versioned configuration.
  • Updates are tested on staging before production, which removes blind changes on the live site.
  • The Nginx page cache, the Redis object cache and the CDN relieve PHP and the database of most requests.
  • Backups are automated, stored off-site and their restore has been tested.
  • The PHP version, Nginx configuration and server settings are under control and documented.

Improvements achieved

  • Move the database to a managed instance to make snapshots and scaling easier.
  • Add a second server and a load balancer if traffic justifies high availability.
  • Automate minor WordPress and plugin updates with visual regression tests.
  • Add a finer-grained web application firewall and file integrity monitoring.

Screenshots

Screenshots will be added once the project is published.

Tell us about your project

Describe your need in a few lines: we come back to you with a first analysis and the next steps.