HTML to PHP

Hi,

I’ve a HTML & wordpress combined site. I prefer HTML but the website is getting big and I find wordpress easier for time saving & cms reasons. Before making the full jump I’d like to try out a few things.

My homepage is HTML and I’d like to change it to php. This way I can hook in some wordpress things eg latest post.

Two questions :

Has anyone experienced seo issues from changing. HTML to php?

Has anyone experienced server issues with this sort of set up? Excessive load etc

Thanks

I just kept all the filenames the same and just told the server to parse all the .html and .htm files for PHP.

That makes the change completely invisible to everyone including the search engines and so it can’t possibly affect SEO.

It will be HTML whatever you do. Presumably you mean changing the extension to .php from .html. I’ve never seen a problem with that, although you might need to do a redirect unless you are replacing index.html with index.php. We might need to know more about your setup.

As felgall says, the easy option is to modify your .htaccess file (or change your server config in another way).

Thanks for the reply. Was just reading up on that. Can it be done just with the index file alone? Or does telling the server mean all .html files would be parsed php?

Thanks. Sorry for not being clearer I was on mobile. Yes I meant changing the extension from .html to .php.

The first I would like to try is the homepage which is indeed index.html.

Yes. What parsing is done is based on the file extension so if you tell it to parse .html files for PHP then they will all be parsed.

That doesn’t mean they need to contain PHP just that the server will spend a millisecond or two looking for PHP before sending the HTML.

Ah, I get it. I just wanted to change the index.html file to a .php for now to see if I can get some WordPress content displaying on it.

Gradually I hope to move the html files over to WordPress itself but that will be a manual process due to trying to keep the same content.

In this case, changing index.html to index.php, would I simply just need to do a 301 redirect?

When going to a website, like amazon.com or whatever, it automatically looks for an index page. It would find index.php or index.html no matter which extension. If you had both, I don’t know what would happen but if you just had plain old index.php you wouldn’t need to do anything.

It would go to index.html.

I don’t think you need to do anything, unless your pages have been specifically indexed by Google with the file name included—such as if you linked to your home page as mysite.com/index.html instead of just mysite.com. But normally one wouldn’t do that.

Not necessarily.

On apache web browsers the order of files to look for to display as the default is determined by the DirectoryIndex command. For example if that command were as below then home.html would be displayed if it exists, if it doesn’t then index.php would be displayed if it exists and only if neither of those exist would index.html be displayed.

DirectoryIndex home.html index.php index.html

OK, thanks for that. On every server I’ve used, it always defaults to index.html over index.php, which tells me at least that this is probably a common default setting.

Ok, thanks for the help everyone. I’ll have to bury myself in some search and replace for a while first as the site is about 10 years old and I’m pretty sure I saw some index.html links in there. Best take care of that first.