I have an html site and an existing WP site with lot's of content. What I would like to do is tie the two together with the blog on back end. So in essence I would have the .html and then on the menu bar Blog that would take them to content there. Is it possible and not overly complicated? Anyone done this or have a simple step by step process?

Kind regards


1 Answer 1


Yes, you can easily do this, but it'll take a little time.

You'll have to install WordPress in a subfolder of your current HTML site, and configure it however you like. Then you'll want to open up the .htaccess file in the root of your site and add the following lines:

AddHandler x-httpd-php .html .htm
AddHandler php-script .php .html .htm
AddHandler php5-script .php .html .htm
AddType application/x-httpd-php .htm 
AddType application/x-httpd-php .html

Using all of the first three lines might be overkill. The first line is known to work if you're on a GoDaddy server, while the next two are for pretty much all other servers (you'll have to test which one of the three works for you). What the above does is takes any PHP thats in your .html files and parses them as PHP, without making you go in and change all your file extensions and deal with 301 redirects, etc.

Now the hard part starts. You have to hard-code the path to wp-blog-header.php into your .html files. Depending on how many you have, this can take a while. (if you're using includes, it'll be easy, but chances are, you're not.) Before the opening call in your .html files, you have to add in <?php include('http://sitename.com/path/to/wordpress/wp-blog-header.php'); ?>

Now your HTML site is connected to WordPress, and you can use any WordPress functions and calls in your HTML files at will.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.