Jump to content

Converting current website to database/php

Whether you're a seasoned veteran or a struggling beginner, Web Radiance is the web development and web design forum for you. You'll find answers to all your HTML, CSS, SEO, and Programming needs. Pull up a chair and stay awhile.

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Converting current website to database/php Rate Topic: -----

#1 User is offline   Man2u2uk 

  • W.R. Lieutenant
  • Group: Members
  • Posts: 396
  • Joined: 14-April 07
  • Gender:Male

Posted 29 January 2008 - 09:17 AM

Hi,

My current website, www.ukfishersonline.com is now getting pretty big, (over 105 pages) and i am soon going to be adding another 40 pages after i have redesigned my fishery map section.

I have been thinking about converting the whole website over to PHP & database driven, but i am unsure on a few things (hopefully you can answer these)

As currently if i want to change something on my left or right columns i have to amend it on all 105 pages individually, where i guess with PHP i could just amend one file and it would change it throughout the website (like CSS?)
  • Would it be difficult to convert?
  • Is it worth converting?
  • Is it worth converting the whole site?, or should i just do certain parts?
  • Will it affect my current ranking on search engines in any way... (as the website is quite estashbiled on alot of other websites & search engines)
  • Can i still keep all my existing page & image filenames?
  • Will spiders & bots, view me the same way?
Thanks in advance
0

#2 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 29 January 2008 - 09:27 AM

I know you can tell your web server to parse pre-existing html files as PHP, that way you won't have to rename all of your file names. Then, all you'd have to do is create an include file for each of the columns and touch all of the pages, only once, to write the php include string.

You'll find some good tips on how to do this here: http://www.google.com/search?client=safari...rse+html+as+php

That, of course, is only for using PHP includes - your quest for database use is another story.
0

#3 User is offline   Karl Buckland 

  • A.K.A. Sirkent
  • Group: Administrators
  • Posts: 2,145
  • Joined: 04-April 06
  • Gender:Male
  • Location:Kent, UK

Posted 29 January 2008 - 09:35 AM

Would it be difficult to convert?
This very much depends on how powerful you want the resulting website to be. Are you looking at simply preventing duplication of HTML/logic or would you rather have a full database-driven CMS?
A version of what you already have with includes would mean you have a PHP file instead of every HTML file and all the PHP files include separate files for the header, navigation, footer, etc. If you want to change your left or right columns, you just change one file. You can even normally get away with changing your design significantly and not changing all of your PHP files. The downside? You have a PHP file for each piece of content. If you have 100 pages now, and will have 200 next year and 400 the year after then you're looking at a file management nightmare and maybe a CMS system (with content stored in the database) would be better? Obviously converting to a CMS will probably be more difficult than a simple include-driven website. But a CMS gives you many more options and is more future-proof.

Is it worth converting?
Anything is better than your current set up!

Is it worth converting the whole site?, or should i just do certain parts?
I'd do it all. It's more complete. And if you only do parts, then you not only have lots of updates to do, but lots of different kinds of updates too.

Search engine ranking, filenames, spiders and bots
You don't have to change anything. Going to a CMS will make it harder to keep your old filenames the same - it's better to just setup redirects from the old filenames to the new URL. There's no reason why Images should change. Search engines and spiders will see no difference if you redirect old pages to new URLs and the content is the same - why would they see a difference? You can even use a .htaccess file so that a request to an old page/image will serve up a new one.

Out of all of this, I think the real question is how much work do you want to do? A CMS is going to cost you more time and involvement, but once it's setup it'll save you the most time overall. PHP includes will be much faster to set up, but could hold you back in future. We can easily answer any other questions you have.
QUOTE(benbramz @ Aug 17 2007, 07:44 AM) Ive noticed that quite a few people are now adding quotes from the board into their signature. I think its started an new web-radiance craze.. :P
0

#4 User is offline   Man2u2uk 

  • W.R. Lieutenant
  • Group: Members
  • Posts: 396
  • Joined: 14-April 07
  • Gender:Male

Posted 29 January 2008 - 09:53 AM

Ok, correct me if i am wrong. but from what i just read on google it looks pretty easy.
  • Rename all .html files to .php
  • Add the following to htacess."RedirectMatch permanent ^(.*)\.htm(l?)$ $1.php" (It Redirects HTML File Requests To PHP Files To Stop Broken Links)
  • Move left column code from each page into external file (replace existing left column code on each page with include 'leftcolumn.php';)
  • Move right column code from each page into external file (replace existing code on each page with include 'rightcolumn.php';)
By doing the 4 steps above i should have:
  • A fully working PHP website
  • No broken internal & external links
  • Not affecttecd my search engine rankings
  • Be able to change one file (either leftcolumn.php and/or rightcolumn.php) and it will change it on every page throughout the website

0

#5 User is offline   Karl Buckland 

  • A.K.A. Sirkent
  • Group: Administrators
  • Posts: 2,145
  • Joined: 04-April 06
  • Gender:Male
  • Location:Kent, UK

Posted 29 January 2008 - 10:01 AM

Yes. You might have some fun with paths if you have files in different directories.
QUOTE(benbramz @ Aug 17 2007, 07:44 AM) Ive noticed that quite a few people are now adding quotes from the board into their signature. I think its started an new web-radiance craze.. :P
0

#6 User is offline   haku 

  • 日本語 Ninja
  • Group: Members
  • Posts: 652
  • Joined: 21-September 07
  • Gender:Male
  • Location:Yokohama, Japan

Posted 29 January 2008 - 10:19 AM

Its worth it. And the list of stuff you outlined there is pretty much exactly what you need to do (I don't know about the syntax on the .htaccess rewrite though, I have troubles with them).

The ability to make one change that affects the whole site is well worth the effort.
<a href="http://www.jaypan.com" target="_blank">Jaypan</a>
<a href="http://www.dudes-japan.com" target="_blank">Dudes Japan</a>
0

#7 User is offline   Man2u2uk 

  • W.R. Lieutenant
  • Group: Members
  • Posts: 396
  • Joined: 14-April 07
  • Gender:Male

Posted 29 January 2008 - 10:24 AM

First i will get the website converted then focus on my shop. the below picture shows the directorys for my current website

Attached File  Untitled_1.jpg (9.61K)
Number of downloads: 0

The shop has a few more directorys but only has about 5 html pages (as most of the shop is already database driven by ekmpowershop) so it should not take that long

the main reason for the conversion is soon i am going to create a directory of all the fishing places in the UK, (i have calculated it will be about 40 pages)

it made me think that it would be easier to populate a database with all the information needed then just change the query on each page to get its data.

i am then hoping to diaply the data in alphbetial order

(Page 1) SELECT * FROM Directory WHERE City='Ireland' ORDER BY Address
(Page 2) SELECT * FROM Directory WHERE City='Kent' ORDER BY Address
(Page 3) SELECT * FROM Directory WHERE City='Norfolk' ORDER BY Address
(Page 4) SELECT * FROM Directory WHERE City='Surrey' ORDER BY Address
(Page 5) SELECT * FROM Directory WHERE City='Sussex' ORDER BY Address

........ and so on untill page 40
0

#8 User is offline   EncoderDecoder 

  • W.R. Sergeant
  • Group: Members
  • Posts: 260
  • Joined: 01-March 11
  • Gender:Female
  • Location:Philippines

Posted 17 April 2011 - 10:52 AM

wow, even though I am not the one who started this thread, still I am thankful for the great pieces of information you guys put up here..

thumbs up!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users