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.
Yes, I do conversions for others. If you would like a quote, simply send me a link to your site and contact information using my Contact Form.
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.
- Index.html has been copied to home.php http://test.cybercoded.com/
- Original About.html still in place http://test.cybercoded.com/about.html
- WordPress Version of About has been created http://test.cybercoded.com/?p=48
- Additional page has been created http://test.cybercoded.com/?p=44
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.