This is the second post I have written on this topic, the first post was Convert Static HTML Site to WordPress Easily. In that first post I covered a very simple way to convert a static HTML site to WordPress.
After almost 2 years of answering questions on that post I thought it was time to discuss the issue again.
I have done a dozen or so conversions since that post and I have found that some sites really need to take a fresh start approach to get the best result. The main reason for this is that a lot of older HTML sites are built with outdated techniques and WordPress has made some great advancements.
On these sites I create a sub folder for the WordPress install, such as /wp. This gives us designated area to work and learn WordPress without interfering with the original design. The hardest task may be getting a theme to match your original design, but I would suggest taking this time to update your original design. There are so many good WordPress Themes this should not be a problem. Once your theme is in place you can copy and paste your original content to the new install matching the page names. Depending on your original file extensions you may need to set the permalinks in WordPress.
Once this development is complete it is easy to change the Site address (URL) in WordPress to show the new site in the root. (Make sure to backup the original first!) Here is the link from the WordPress Admin panel that explains this.
If you need to learn WordPress and want to take a little time without being pressured to get the new site in place this is the best option I have found.
NOTE: This post was originally posted in January of 2009 and was intended to help small HTML sites (5 to 10 pages) convert to WordPress. A lot has changed since then, and if you are trying to convert a larger site I highly recommend taking a little deeper approach. I have written another post (Convert HTML to WordPress) on the subject in 2010 that might help larger sites make the transition to WordPress.
Working with someone recently made it apparent the process to move a static site to WordPress has been made a lot harder than it needs to be. Here is the easiest way to convert a static website to a WordPress blog. You will not have to do any redirects or modify any files other than in the WordPress admin area.
Let’s assume we have 3 static pages, Index.html, about.html and products.html and we want to move to WordPress.
- Install WordPress in the root of this domain.
- Immediately copy the Index.html to the WP Theme (whichever theme you are using) folder, and rename it Home.php
At this point, your site will look to the world just like it always did. WordPress will automatically use the home.php page as the default, and now you can go about putting it all together. You should have no broken links or any worries about redirects.
- Leave the permalinks with their default settings. This keeps you from having problems with existing pages.
- Copy the contents from About.html and create a page called About
- Copy the contents of your other files and make pages with the exact same names. If your page names are different than the titles, you can edit the permalink to match the filename (without the html extension).
- Once the data is copied and you have the look you want, change the permalink to /%postname%.html
- For PAGES (Not POST) to use the HTML extension you need a plugin as WordPress only applies the Permalink structure to the posts. Recommended HTML Extension Plugin -> WordPress Hero
- Install this Plugin first for the pages.
- Remove the old static pages, I suggest keeping them just in case you have a problem, but you need to move them out of the root.
- Copy the index.html contents to the file you want to be your home page, and delete the Home.php file. Typically this is the index.php in the theme, however you may want to use a static page depending on the site setup. You can change this is the WP Settings.
At this point, your conversion is done.
All I have to do is change the permalink and remove the old files and I am done.
There, no need to mess with your .htacess file, and no need to worry about redirects, let the system handle it for you.
And yes, I have done several sites like this.
I also use the Home.php method to park a page if I need time to work on it before going live.