Skip to main content
Migrating a static site to WordPress — URL mapping, hosting requirements, and performance planning

Migrating a Static Site to WordPress: What to Plan For

Moving a static HTML site to WordPress is a structural change that goes deeper than a content import — it is a change in how the server generates responses, how URLs are structured, what the hosting stack needs to provide, and what ongoing maintenance looks like. This guide, part of the development section, covers the concrete planning requirements: URL structure mapping and redirect handling, server environment requirements, the plugin decisions that most affect long-term maintainability, and the performance implications that often go unaddressed until they become problems. Compression configuration covered in the Apache mod_brotli guide and the media protection approaches in the modern hotlink protection guide become relevant once WordPress is serving production traffic.


The short version

→ Short Answer

The most consequential decision in a static-to-WordPress migration is URL mapping. Static sites frequently use .html file extensions or flat directory structures that WordPress's permalink system does not replicate by default. Every URL that existed in the static site needs either a matching WordPress URL or an explicit 301 redirect — and that mapping needs to be complete before the site goes live. Hosting requirements change substantially: a static site needs only a file server; WordPress needs PHP, MySQL, and enough RAM to handle WordPress's memory footprint per PHP worker. On shared hosting, this often means upgrading the hosting plan.


URL mapping: the critical planning step

Static HTML sites commonly have URLs in one of three patterns:

  1. File extension URLs: /about.html, /contact.html
  2. Directory index URLs: /about/, /contact/ (with index.html inside each)
  3. Flat with no extension: /about, /contact (using server-level content negotiation)

WordPress's default permalink structures use the directory index pattern (/about/) or date-based paths for posts (/2024/01/my-post/). Pages created in WordPress get their slug from the page title or from manually set slugs — there is no automatic mapping from static filenames.

The safest approach is to audit all URLs in the static site before migration and map each one to its WordPress equivalent. For sites with fewer than a hundred pages, this is a spreadsheet exercise. For larger sites, a crawl with a tool like wget --spider or Screaming Frog produces a complete URL inventory.

Terminal — crawl static site for URL inventory
wget --spider --recursive --no-verbose --output-file=crawl.log https://example.com
grep '^--' crawl.log | awk '{ print $3 }' | sort -u > url-list.txt

The resulting URL list becomes the basis for the redirect map. Each URL that will not exist at the same path in WordPress needs a redirect entry.


Implementing redirects in WordPress

Once the URL map is built, WordPress can implement redirects through server configuration (preferred for performance) or through a plugin:

Apache .htaccess — static extension to WordPress URL redirects
# Redirect .html pages to WordPress equivalents
Redirect 301 /about.html /about/
Redirect 301 /contact.html /contact/
Redirect 301 /services.html /services/

# Redirect old date-based paths
RedirectMatch 301 ^/archive/(\d{4})/(.+)\.html$ /blog/$2/

Server-level redirects in .htaccess or the virtual host configuration are processed before PHP, which means they add no WordPress execution overhead. Plugin-based redirect management (which reads from the database on each request, then returns the redirect) is convenient for large redirect sets but adds a database query to every unmatched request.

⚠ Common Pitfall

WordPress's built-in pretty permalink system uses a catch-all rewrite rule that passes unmatched requests to index.php. If your .htaccess redirect rules are placed after the WordPress rewrite block, they will never be evaluated — WordPress will intercept the request first and return a 404. Redirect rules for static-to-WordPress migrations must appear before the WordPress rewrite block in .htaccess, not after it.


Hosting requirements

Then

Static site hosting: Any server capable of serving files over HTTP — a basic nginx or Apache configuration, a CDN with a storage origin, or a static hosting service. No server-side language runtime required. Memory requirements are minimal: the web server process itself, with file serving handled by the OS page cache. A 512 MB VPS can serve a medium-traffic static site without issue. Server restarts are instant; there is no application state to initialise.

Now

WordPress hosting: PHP (7.4 minimum, 8.0+ recommended) with the required extensions, MySQL or MariaDB, and sufficient RAM to support multiple simultaneous PHP worker processes. WordPress's minimum memory requirement per PHP-FPM worker is 64 MB, but realistic WordPress installations with caching and plugin infrastructure require 128–256 MB per worker. A VPS with 1 GB RAM can support two to four PHP workers before memory pressure affects other services. WordPress also introduces an attack surface that a static site does not have: the WordPress admin, XML-RPC endpoint, REST API, and login page all require ongoing security attention.

⬡ Observed Behaviour

On a migration from a static Hugo site to WordPress on a shared hosting account, the shared hosting account's PHP memory limit of 128 MB caused WordPress to crash during plugin activation — the admin area returned a white screen, which is PHP's manifestation of a fatal memory exhaustion. Raising the limit to 256 MB in php.ini or via wp-config.php (define('WP_MEMORY_LIMIT', '256M');) resolved it. The static site predecessor had run on the same account without any memory considerations whatsoever.


Plugin selection principles

The WordPress plugin ecosystem contains tens of thousands of options for any given function, with quality variation that is not obvious from plugin ratings or install counts. For a migration from a static site, the minimum viable plugin set is:

  • Caching plugin (WP Super Cache, W3 Total Cache, or LiteSpeed Cache if the server supports it): Without caching, every request executes PHP and queries the database, making WordPress substantially slower than a static site for the same content.
  • SEO plugin (Yoast SEO or Rank Math): Manages canonical tags, XML sitemaps, and meta descriptions — all of which were trivial to control in static HTML and require explicit configuration in WordPress.
  • Security plugin (Wordfence or Solid Security): Provides login protection, file change monitoring, and vulnerability scanning. The modern hotlink protection guide covers image and media protection independently.
WordPress admin showing plugin activation and PHP memory usage during static site migration setup
⚠ Common Pitfall

Plugins that modify .htaccess at activation time — caching plugins, security plugins, and some SEO plugins — can overwrite each other's rewrite rules. If your redirect rules were added manually before plugin activation, verify them afterward. The order of rule blocks in .htaccess is significant, and some plugins prepend their rules to the top of the file regardless of what is already there.


Performance implications

A well-configured WordPress installation with a caching plugin can approach static site performance for cached responses, but the comparison is not one-sided:

  • Cache warming: WordPress caches are populated lazily — the first visitor to any uncached page receives a full PHP/database execution time. Static sites have no warm-up requirement.
  • Cache invalidation: Every post or page edit clears cached versions, creating a burst of uncached requests until the cache is rebuilt. On high-traffic sites, cache stampedes at publication time can cause brief performance degradation.
  • Database growth: WordPress's post revisions, transient options, and log data accumulate over time and eventually affect query performance without periodic maintenance.
↻ What Changed

WordPress 6.0 and later include improved caching APIs at the core level, reducing the reliance on external object cache plugins for basic performance. The Site Health tool introduced in WordPress 5.2 provides actionable diagnostics for common performance and security issues. For compression, WordPress does not handle response compression natively — it delegates to the server layer. Enabling Brotli at the Apache level via mod_brotli, as covered in the Apache mod_brotli guide, applies equally to WordPress-generated responses and static files without modification to WordPress configuration.