April 28, 2005

Quick And Easy PHPification A.K.A. The Handy Guide

Having your blog generate PHP rather than HTML opens the door to all sorts of cool stuff, particularly if I make a mistake during the regular PHP upgrades and take down your site.

Ahem.

Apart from that PHP allows you to easily have multiple styles, include files from other places (like blogrolls), and as in todays example, compress your pages so they download faster.

Upgrading to PHP isn't hard, and here's how to do it.

Step 1:

Under Weblog Config, in the Preferences page, you will find an entry that says File extension for archive files

If this says html, change it to php. If it says php already, then you don't need to change it at all! Make sure you use lower case.

Click Save.

Got that? Good! You're half way there!
Step 2:

Go to the Templates screen, and select your Main Index template. Check the Output File. If it says index.html, change it to index.php.

Click save.

Yay! You're now running PHP!

I've tried to remember to do this when setting new Munus, but sometimes it gets skipped over. So my apple-logies in that case, but at least it's easy to fix.

Posted by Pixy Misa at April 28, 2005 02:32 PM
Comments
#1

There is also the Master Archive index output file, should that one be changed to php too?

Posted by Oorgo at April 28, 2005 11:19 PM
#2

It won't hurt, but no-one ever uses that.

Posted by Pixy Misa at April 28, 2005 11:47 PM
#3

OK, so sell me on this.

"Apart from that PHP allows you to easily have multiple styles, include files from other places (like blogrolls)"

Where can I go to learn more?

Posted by Angry in T.O. at April 29, 2005 12:17 AM
#4

Aye, aye Captain. Mine is not to ask why, but only to do as ordered.

Posted by Tig at April 29, 2005 01:47 AM
#5

I did rebuild everything. I hope that was the proper procedure.

Posted by Tig at April 29, 2005 01:47 AM
#6

Tig, yep, rebuild is good.

Angry, check over in the sidebar in the Useful Thingies section.

This is one example of something you can do easily in PHP that would be impossible otherwise - division. Um, in a web page, that is.

Posted by Pixy Misa at April 29, 2005 02:13 AM
#7

Cool

Posted by Angry in T.O. at April 29, 2005 04:03 AM
Live Comment Preview
Post a comment









Remember personal info?