From Static HTML to WordPress Website

This is a question I get on a regular base: How can I convert my Static HTML website into a WordPress website?

Let me give you a warning in advance, a WordPress website needs to be kept updated!
A static HTML site can run for years without you ever touching it for things like security updates. Just to make you aware of the need for updates!

Another thing that needs really close attention is to make sure that your rankings in Google and other search engines stay intact.
That means you need to make sure your URLs of your old site will stay the same with your new WordPress based website.

Luckily this can be done and for those few links you want to change you can redirect them via your .htaccess file.

But first things first, the conversion of your website.

First, what do you need:

  • good hosting that support php
  • a mysql database: databasename, username for that database and the password for that useraccount
  • the possibility to use a .htaccess file

If you are not sure about the above mentioned items, ask your website hosting provider!

Installing WordPress in a Subfolder

The first thing you will do is to install WordPress into a Subfolder like /cms .

After you finished the installation you have to set the Privacy setting so that Search Engines are not allowed to visit and index your site (Settings -> Privacy) so your new URLs are not getting into the index until you are ready with your conversion.

Now you can strat building your WordPress website next to your current site, that site will say active while you build a new one.

Keeping Old URLs

Like a mentioned before, it is very important that you keep the URLs for the new site the same as the old one!

That is why you need to set the Permalinks to custom with the value /%postname%.html this will result in Posts links with the extension .html.

During the development of your new site the urls will be like /cms/pagina-url.html zijn, but after the final steps this will become /pagina-url.html , that same as the old site.
Make sure that the “slugs” are the same as the old site, and there is a plugin you will need is “.html on pages” . I take it you will have some pages that use the extension .html

You can now start to convert your old pages to WordPress by copying the text or the HTML code of the content from the old website into the HTML code screen of WordPress.

Your page URL is created by the Title of your page, but you can change them by editing the Slug permalink.

There is a plugin that could help you convert old pages: http://wordpress.org/extend/plugins/import-html-pages/ Attention! For this plugin to work you really need  PHP5! Ask your hosting provider if you are not sure.

Website Layout

The conversion from your old site to a WordPress based site with the same layout is completely different exercise than what I am describing here, to do that your will have to get a complete custom Theme / Layout. But why not take this opportunity and change the look of your site together with the conversion? Choose a nice premium or free theme  that will fit you company / website topic and customize it to your needs.

If you are happy with the look and feel and the content of your site you can follow these step to get it “live”:

1. delete or rename the index.html file in the root of your old site.
2. copy the index.php and .htaccess file from the /cms folder to the root of your site
3. change one rule in the index.php file into require(‘./cms/wp-blog-header.php’); (only with the index.php file in the root, not in the folder  /cms!!)
4. change only the Site address (URL) in the general setting (Setting -> General) into the domain name. (remove the /cms part)

Change Site Address Only!

Change Site Address Only!

5. remove or rename the old  .html files.
6. change the privacy settings so the Search Engines can access and index the site again.

If you handle the change over it this manner, than your old site is not reachable during the 5 minutes you need to change the index.html to the index.php and if you kept your URLs you are not loosing any visitors from the search engines like Google.

And of course you had taken a Back-Up of your old static website so you can restore you old side if you should encounter an unexpected error.

If you want new URLs for your pages than you can redirect the old URLs to the news ones in two ways:

Good luck and if you still have some questions, please use the contact form.

If you have other tips and additions that might help others, please write them in the comments section below.

One last question: Is there a need to have this information in an even more detailed form like a pdf manual with screen shots and tips? if so, please leave a comment.

WordPress Website Migration

 

Other Articles of Interest:

Comments

  1. Leah says:

    One last question: Is there a need to have this information in an even more detailed form like a pdf manual with screen shots and tips? if so, please leave a comment.

    Yes please. That would be very helpful.

  2. NYC Birthday says:

    Hi there. This information is great, but a PDF with even more detailed information would be extremely helpful.

  3. Pam says:

    Yes please! I think that would up my comfort level alot if I decide to attempt this.

  4. Curt Preston says:

    I would very much like to see a more detailed PDF for converting.

  5. Eric says:

    Is there a way to use WP as a CMS for a site that is already complete without moving/changing the current website. My client would like to make changes to the site via a CMS system.

    Thanks

    • @Eric, sorry for the late response. To answer your question, the current site of your client really needs to be converted into a WordPress website.
      A cms works with the content stored in a database and the layout via layout templates.

      So you really need to convert the site in a way that the contant is separeted . The site does not need to move and there are services on the internet that can convert the layout of the current site into a WordPress theme. That way you keep the look and feel of the site and have the power of WordPress.

  6. saleem says:

    Hi, Thanks for the great info. I have one question. I recently converted my old static site to wordpress. I followed the exact procedure as described by you. Now I have just one confusion. The backlinks to my old site are all like this http://www.mysite.com/aboutus i.e. they do not have the .html extension in them. Now since i changed my permalinks to http://www.mysite.com/aboutus.html (with a .html extension) a url without the .html extension will give a 404 page. Will I loose all such backlinks? How to fix this problem?

    Thanks

    • @Saleem: The .html extensions isn’t mandatory, in your case you could try to set the permalinks options to /%postname% and see if that works for you.
      However if you want to keep the .html extension and not loose the backlinks and rankings you can redirect the old links to the new ones.

      There are two ways to do that, first is with a plugin called http://wordpress.org/extend/plugins/redirection/ or via .htaccess 301 redirects.
      I think the plugin will serve you best if you have a lot of pages or if you don’t like to edit your .htaccess file.

      If its just a few pages you can create a 301 redirect rule for every page, and those should be in your .htaccess like:
      Redirect 301 /aboutus http://www.mysite.com/aboutus.html

      The first value is the old slug without the domain name, the second value should be the full new url.

      Hope this helps.

  7. Seyl Park says:

    Hi. I would love a pdf version of this. Thanks!

  8. Walter Price says:

    I also would like a .pdf of your directions to change a static site to a wordpress site.

    Thank you,

  9. pooja says:

    Please provide the PDF version.

Trackbacks

  1. [...] highly recommend you use WordPress. It will save you headache in the long run if you do decide to make the switch and you want to transfer your [...]

Speak Your Mind

*

CommentLuv badge