PROFIToCRACY: Common Sense Marketing Strategies header image 2

How to Migrate a Static HTML Site to Wordpress

October 18th, 2011 : · No Comments ·

One of the questions I get asked frequently is how can you move a static HTML site to Wordpress without changing the page names?

Let’s look at the basics of what is involved to make it work.

Let’s assume your existing sites pages have an extension of .htm or .html.
Wordpress uses PHP to display pages, so there are some tweaks that need to be made.

First you need to install Wordpress so it is in your public_html folder, at the top level, it cannot be installed into a sub directory, if you do this won’t work.

There are 2 elements that are important to making this work.

One is the permalinks settings in Wordpress.

You will need to check the custom box and enter either..

/%postname%.htm if your pages end in .htm

or

/%postname%.html if your pages end in .html

Now since, wordpress is still operating as PHP, you need to find a way to tell the pages to actually execute as PHP, we do this by adding a line of code to the .htaccess file

You can do this easily by logging into your file manager in cpanel, opening the .htaccess file and adding or making certain this line is present.

AddType application/x-httpd-php .php .htm .html

You could also edit the .htaccess file directly in Wordpress from the permalinks page if your .htaccess file is set as writable, with permissions set to 777.
If you set the permissions to 777 make sure you change them back to 644 after editing.

This line instructs the static HTML or HTM pages to execute as PHP

The next thing you need to do is manually copy and paste the content of your static site over to Wordpress, you need to create the posts. You need to make sure your titles are exactly the same as on your existing site.

There is another way to edit the page name as well, If you are editing a post, you will see directly under the title form area, there is an option that lets you tweak the actual page name. You need to validate that this name is the same as your page name of your existing static site., and that’s it..

Now, if your existing site has page extensions of .php it’s a little bit easier.

First the permalinks still need to be set to custom

you will enter this
/%postname%.php

The good news is, if your page extensions are php currently, you do not need to edit the .htaccess file

As with HTM or HTML page extensions… The next thing you need to do is manually copy and paste the content of your site over to Wordpress, you need to create the posts. You need to make sure your titles are exactly the same as on your existing site.

You will still need to verify the permalink title is correct. If you are editing a post, you will see directly under the title form area, there is an option that lets you tweak the actual page name. You need to validate that this name is the same as your page name of your existing site., and that’s it..

If you are comfortable with Wordpress many of you will have no major issues with this. If you are not comfortable editing, my suggestion is to be careful.

I Also want to add, that it IS possible some of what I have shown you, may differ slightly on some servers, specifically the syntax for the .htacecss file. There is no way I can possibly cover all the variations, that are possible, but what I have shown you will work on MOST servers.

- Dave

Incoming search terms for the article:

Tags: ··

No Comments so far ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment