To convert HTML to WordPress you have three real options (and two half-options covered in the table): turn the HTML into a WordPress theme by splitting it into header.php, footer.php, index.php and style.css; rebuild the pages inside WordPress with the block editor or a builder, keeping the design but not the code; or pay a conversion service to do either. For almost every small business site the second option is the right one, because the point of moving to WordPress is to edit pages without touching code, and a hand-converted theme leaves you exactly where you were. The first option is below in full for anyone who needs the pixel-identical result, then the rebuild method, then the part every guide skips: keeping the URLs and rankings the old site had.
Which way to convert HTML to WordPress should you use?
| Method | Result | Effort | Choose it when |
|---|---|---|---|
| Manual theme conversion | Identical design; pages still edited partly in code | A day or two for a developer | The design is custom and must not change, and someone can maintain PHP |
| Child theme of an existing theme | Existing theme’s structure with your CSS and content | Half a day | You like a WordPress theme’s layout and only need your styling |
| Rebuild in the block editor or a builder | Same look, fully editable pages | One to three days for a 5 to 15 page site | Almost every business site; the usual answer |
| Automated converter tools | A theme wrapper around your HTML | Minutes, plus cleanup | Quick test only; output is rarely clean enough to keep |
| Conversion service | Any of the above, done for you | $200 to $2,000 | No time or skills in-house |
Method 1: convert the HTML into a WordPress theme
- Create a theme folder in
wp-content/themes/yourtheme/with two required files:style.css(with the theme header comment at the top: Theme Name, Author, Version) andindex.php. - Split the HTML. Everything from
<!DOCTYPE>to the end of the navigation goes intoheader.php; the footer and closing tags intofooter.php; the page body intoindex.php. - Add the WordPress hooks.
<?php wp_head(); ?>before</head>,<?php wp_footer(); ?>before</body>, and<?php get_header(); ?>andget_footer()at the top and bottom of index.php. - Fix asset paths. Replace
css/style.cssand image paths with<?php echo get_template_directory_uri(); ?>/css/style.css; better, enqueue styles and scripts infunctions.phpwithwp_enqueue_style. - Replace the static content with the Loop so pages come from the database:
<?php while ( have_posts() ) : the_post(); the_content(); endwhile; ?>. - Make the menu dynamic with
register_nav_menusin functions.php andwp_nav_menu()in header.php. - Add page.php and single.php for pages and posts, copied from index.php; the WordPress template file reference lists the full hierarchy.
- Activate the theme under Appearance, Themes, create the pages, paste in the content, and test.
This produces a site that looks identical, with the design still living in template files. It is the right method for a developer who will keep maintaining the theme; for an owner who wants to edit the home page hero without opening header.php, it solves nothing.
Method 2: rebuild the pages in WordPress
- Install WordPress on hosting (do you need hosting for WordPress covers the choice) on a staging subdomain, so the HTML site stays live throughout.
- Pick a lean block theme (Twenty Twenty-Five, Ollie, or a blank theme for a builder) and set the fonts, colours and logo in the Site Editor to match the old site.
- Recreate each page with blocks: cover, columns, headings, images, buttons. Paste text, upload images at the right sizes, and keep headings in the same hierarchy as the HTML.
- Recreate the menu, footer and forms. Contact forms become a form plugin; any custom JavaScript becomes a plugin or a Custom HTML block.
- Match the URLs (next section), then point the domain at the new host.
Two to three days for a typical brochure site, and at the end the owner can edit every page. Most “HTML to WordPress” projects I take on are this method, often combined with the design cleanup the old site needed anyway; custom design versus a theme explains when the rebuild is also the moment to redesign.
How do you keep the URLs and rankings?
Static HTML sites have URLs like /services.html or /about-us.htm; WordPress uses /services/. Every old URL with any traffic or links needs a 301 redirect to its new address, or the site starts over in Google.
- Export the old URL list: Search Console, Pages report, plus a crawl with Screaming Frog or the sitemap.
- Map each to a new WordPress slug. Where possible keep the slug identical minus the extension:
/services.htmlto/services/. - Add redirects with the Redirection plugin or in
.htaccess:Redirect 301 /services.html /services/. A regex rule handles the pattern in one line:RedirectMatch 301 ^/(.*)\.html$ /$1/. - Keep the title tags and meta descriptions from the old pages (copy them into Yoast or Rank Math), and keep the H1s.
- Submit the new sitemap in Search Console and watch the Pages report for two weeks.
The redirect step is the same one that protects rankings in a WordPress domain change, and skipping it is the single most common reason a conversion “lost all our traffic”.
What gets lost or changed in a conversion?
- Speed. A static HTML page is the fastest thing on the web; WordPress adds PHP and a database. Caching, a lean theme and a decent host keep the difference small; the speed optimisation checklist covers it.
- Custom scripts. Sliders, calculators and animations built into the HTML need re-implementing as blocks, plugins or Custom HTML blocks.
- Forms. PHP mail scripts do not carry over; use a form plugin.
- Maintenance. The static site needed none; WordPress needs regular updates. That is the trade for editability and plugins.
Should you convert at all?
Convert when the site needs a blog, a shop, forms with logic, member areas, or an owner who edits pages. Keep the HTML site if it is five pages that change once a year and someone can edit them; a static site is fast, secure and free to run. If the reason for converting is really “the site looks dated”, the honest fix is a redesign on whichever platform fits, and the platform comparison is where to start that decision rather than with a conversion.
Frequently asked questions
Either split the HTML into theme files (header.php, footer.php, index.php, style.css) and add the WordPress template tags, or rebuild the pages in the block editor or a page builder on a fresh WordPress install. Then redirect every old .html URL to its new WordPress address.
Yes. WordPress is free and both the manual theme method and the rebuild method cost only time. Hosting is the one expense. Free online converters produce output that usually needs as much cleanup as starting over.
Not if you 301-redirect every old URL to its new one, keep the same titles, descriptions and headings, and resubmit the sitemap. Rankings drop when redirects are skipped.
Slightly, by default, because pages are generated by PHP and a database. With caching, optimised images and a lean theme the difference is small enough that visitors and Google do not notice.
A day or two for a developer to convert the theme manually; one to three days to rebuild a 5 to 15 page site in the block editor; longer if the design is also being updated.
For the manual theme method, yes, or at least comfort with PHP. For the rebuild method, a confident site owner can do it, though a designer will do it faster and handle the redirects.
