Now we comes the part where we throw in some cache-action. Brought to you by the Dynamic Duo Mattman and Zeller the Boy Wonder. Now Staticize Reloaded is not the best thing since sliced bread, but it is pretty great regardless.
Now I am not going to get into the “how” the plugin works, I mean who wants that! We are Americans, we just want it to work now! So anywhoo, follow these easy steps to set up a little cache action:
Okay so now we have our pseudo-static sections caching (as well as our non-pseudo-static sections), so what is the next weapon to add to our arsenal? Read on and find out.
The next part of this tutorial requires you to be able to make changes to your apache setup, either through editing of httpd.conf or through .htaccess. Sooo… if you can’t do one of these two things, please skip on to page 3. Those of you still with me, lets get to the hackin! What we are trying to accomplish here is to add some flare to our newly created and cached sections. Most sites that have aboutme and colophon sections use a site uri something like this: mysite/colophon/, now our solution poses a problem since they are not files in sub-domains, they are php files residing in our $siteroot, or wp directory. There are two ways to approach this:
So, what we need to do is fire up the old terminal and edit either httpd.conf or .htaccess. I will let you find out where these files are located since each distro handles placement differently. For this haxie we simply need to add this snippet of code:<Directory /home/www/sitename/htdocs>Options + MultiViewsto your httpd.conf file or your .htaccess and then once saved, restart apache. I prefer the lovely:
</Directory>apachectl gracefulcommand to restart apache, since it politely kills the child processes instead of just hacking them off wholesale. ; Now there could be a performance impact by doing the above, but unless you are running with a couple million hits a day, it is minimal.
Okay now we have our site running without file extensions, and caching. So what is left? Good question, to close I wanted to suggest some cosmetic changes. On our pages like aboutme and colophon, we really don’t want to have people leave comments, and we don’t really need to display the time, day, category and author for each of these “entries” so we should get rid of those function calls. Keep in mind that what we might want is a last updated on bit of code, that would find the date and time for the newest entry on that cat and echo it out.
That can be accomplished by using a bit of custom code, or by exploiting some of the functions already built into WordPress. That my friends is your homework. Well that is it for now, let me know if there is anything else you would like to hear on this topic, or if anything I have stated is not as clear as it could be.
Cheers.
Stroll on over and visit pierrebenoit
March 1, 2007
Please,
Can you add more wp tutorial about how to custumize the system?
Thanks
Stroll on over and visit Alisha
March 1, 2007
I have a question. After adding
Options + MultiViews to my .htaccess file, I get a 500 server error I encountered an unrecoverable server error. Please go back and try again message. Right now, I’m trying to set up the test blog that will be converted to the main index page once I work out all the kinks. Do you think I get the error message because of that? (Maybe I’m not directing the pages to the right place?)Leave a Reply