Have an html site but want to add an existing WordPress site to the back end.

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.