Converting CSS/HTML website to PHP

12 replies
  • WEB DESIGN
  • |
Silly question time?

Have several sites built in css/html with Dreamweaver. Now want to add comments feature using the XCommentsPro software I have just bought. To drive the comments, any page has to be suffixed with a .php extension.

Q1: Rather than having some pages .html and some .php would it be cleaner and better to just switch all pages to PHP? Then add the commenting extra php code to those that need it? Any impact on sites doing this?

Q2: Got no pagerank to speak of yet, but does a switch to .php lose the Google indexing rank?

Q3: Anything else I need to be concerned about? (Like I know I need to update links feeding sites to .php and that I need t)

Thanks for any advice.
#converting #css or html #php #website
  • Profile picture of the author awesometbn
    Originally Posted by RichardHK View Post

    Q1: Rather than having some pages .html and some .php would it be cleaner and better to just switch all pages to PHP? Then add the commenting extra php code to those that need it? Any impact on sites doing this?
    Depends on your web server and how it will interpret web pages based on suffix (the file extension). I've had the same situation come up in the past, and decided I would change everything to .php. No problems because my web server will handle properly .php, .htm, .html, and so on. If in doubt check your server documentation or log a help ticket with server support.

    Originally Posted by RichardHK View Post

    Q2: Got no pagerank to speak of yet, but does a switch to .php lose the Google indexing rank?
    Honestly I don't think this matters to Google. I could be mistaken, but to tell you the truth they change their page rank algorithm all the time, so whatever works today has no guarantee to work tomorrow. Switch to .php and don't worry about it.

    Originally Posted by RichardHK View Post

    Q3: Anything else I need to be concerned about?
    Internal linking between pages and anchors and images. To clear up potential confusion you could setup a redirect that will take any requests for the old .html files and send them properly to the "new" .php files.

    Please let me know if this helps. Thank you.
    {{ DiscussionBoard.errors[2404343].message }}
  • Profile picture of the author RichardHK
    Yes, thanks for your helpful reply. Fell much better about taking the php plunge now. Might even encourage me to learn more php for future database apps.

    I have a new Hostgator resellers account and tests with simple php contact forms has worked fine so far. (Doesn't on the ISP I am moving sites from.) But best to send a query ticket as you suggest in to see if there is anything special I should check.
    Signature

    Richard, Hong Kong
    Business Consulting

    {{ DiscussionBoard.errors[2404393].message }}
  • Profile picture of the author wayfarer
    Just be sure to redirect the old pages to the new addresses with a 301 status (permanent new location), and you'll be fine.
    Signature
    I build web things, server things. I help build the startup Veenome. | Remote Programming Jobs
    {{ DiscussionBoard.errors[2404731].message }}
  • Profile picture of the author remotedb
    Well there is one minor penalty to be paid for switching to PHP. That is that there is a slight amount of processing overhead that will occur as a result even for pages with no actual PHP code in them. This will slow down page loads and server performance, though not by much. HTML does not have to be processed by the server so it incurs no such penalty.

    The other issue is a maintenance issue, should you ever need to hire a programmer to modify your site. If every page is a php page, then he won't be able to readily distinguish between those pages that have functional dynamic code and those that are static. On a sizable site, if he has to figure out something that is not obvious he could get bogged down for hours or even days because each page would have to be examined individually.
    Signature
    TwEmpire -Build an empire of Twitter followers on autopilot FAST!! Phase I Beta Test Coming Soon!
    {{ DiscussionBoard.errors[2404962].message }}
  • Profile picture of the author RichardHK
    Thanks.

    Will be sure to include 301 redirects for every page, and will leave both copies on server for a short while to be sure of no 'not found' pages!

    Sad about the slight penalty as I love the speed of native html for sure. I have noticed the slight delay on php forms I am using now but never gave it a serious thought ref whole site. Got no choice it seems if I want easy to maintain comments/blogs, so will keep an eye on this point. I am Ok with css/html but not into php at all yet.

    Maintenance point good too. Gives me the idea to add a simple comment at each page top to say if php dynamic code is present. Thanks for that.

    My plan now is: 1. Save all html pages as php. 2. Fix and test all internal site links. 3. Upload to site in parallel with existing html files. 4. Test php 'site' remotely. 5. Redirect all html pages to php. Update: All done Ok. Will convert second site tomorrow. No sweat but just gotta get my PHP server working on my PC end.

    Thanks again guys.
    Signature

    Richard, Hong Kong
    Business Consulting

    {{ DiscussionBoard.errors[2406634].message }}
    • Profile picture of the author Luxmo
      Originally Posted by RichardHK View Post

      No sweat but just gotta get my PHP server working on my PC end.
      Look into XAMPP (apachefriends dot org). Is exactly what you need.
      {{ DiscussionBoard.errors[2425770].message }}
  • Profile picture of the author ministerof
    I don't think PHP loses PR ..

    I personally prefer PHP . Most of the sites now use PHP over HTML .. With PHP , we can INCLUDE things like title and header and so ..
    {{ DiscussionBoard.errors[2408760].message }}
    • Profile picture of the author burton247
      Originally Posted by ministerof View Post

      I don't think PHP loses PR ..

      I personally prefer PHP . Most of the sites now use PHP over HTML .. With PHP , we can INCLUDE things like title and header and so ..
      +1

      If done properly they are easier to manage. Just take a look around and see how many pages a php and how many are html
      {{ DiscussionBoard.errors[2421268].message }}
  • Profile picture of the author cdwise
    Changing the file extension can cost you PR temporarily if you don't do a 301 redirect. Depending on your hosting you may be able to change the mime type and parse html for php. I've done that with some client sites when we had an established site and were adding interactive features that required server side processing.
    {{ DiscussionBoard.errors[2426223].message }}
  • You can do many things to limit your issues with php pages and their load times etc. etc. I have begun using a CMS from concrete5.org and it uses a solid template system for pages and is highly extensible and SEO friendly. I am considering using it for all of my clients projects in the future due to the ease of use and simplicity of getting someone up and running with the CMS. Pages are properly cashed to avoid issues of page load times and you have the ability to add any custom coding that you need within the framework... a real win win situation.
    {{ DiscussionBoard.errors[2426224].message }}
  • Profile picture of the author RichardHK
    Thanks again guys.

    I have just downloaded Xampp and will give that the first opportunity to work for me. Like the look of it. Have Wamp on one of my machines so far and it is not that friendly so will have a good chance to compare later today. Sure miss the Dreamweaver page previews.

    Will also check out the CMS suggestion as I am aware that I do need to move in that direction. Have noticed some delays on my own site (not critical as developing other sites for IM purposes).

    Seems that Google has half-embraced my php site now. Still got some html pages in the cache so will keep my 301s in place until they get replaced by the php pages which is starting. Weird how their crawler does half a job. I submitted a new sitemap.xml after deleting all the html pages and was expecting a 100% changeover.
    Signature

    Richard, Hong Kong
    Business Consulting

    {{ DiscussionBoard.errors[2426581].message }}
  • Profile picture of the author sydneyrebello2
    Using 301 re-direct you can cut down the harm that can happen after converting your website extension. If hosting permits you can convert form Html to php.
    {{ DiscussionBoard.errors[2610035].message }}

Trending Topics