How to Not Mangle Your WordPress Blog Code with Plugins

mangled plugin codeLess than a year ago, I installed WordPress for the first time and was fascinated by the functionality you could add to your blog by installing plugins. Once I found the plugin directory, I was like a kid in a candy store, installing everything I could. What I didn’t realize is that once I deactivated the plugin, there was still left over code on my pages.

As I looked at my pages for single.php, comments.php, header.php, and others, I seen orphaned code from plugins that i deactivated and removed from months before. I did try to delete what I thought was the correct line of code, but often it would cause the blog to throw an error. I needed a way to organize my plugins so that I would not have old and crusty code sitting on pages that could be slowing down processing or causing the page the site to not work to it’s full potential.

My solution is a simple one. Get a three-ringed binder and print out Readme.txt files that usually comes with the plugins you install. As you know, some of the plugins require you to put a tag or two on various pages. Now, when you want to remove the plugin completely, then go back to the page in your binder and delete the code where the author told you to previously add it. That way, you keeping track of the extra code that is going on and off your blog’s templates.

Make two sections with your binder. One for current and one for removed plugins. This will give you a historical reference of the plugins that you have removed from your blog.

If you do not want to use a three-ringed binder, then you can save the Readme.txt files in specific folders on your computer. Rename the files to the name of the name of the plugin so you do not get confused. You may still want to keep track of the plugins you remove.

Another good reason for keeping track of your plugin code is when you change themes. If you change themes, often you need to add the plugin code on the new pages. This way, you will have a complete record of what needs to go where.

This month Darron Rowse at Problogger is conducting a project called “31 Days to Building a Better Blog“. Your code is the building blocks of your code. Don’t erode the foundation of your blog with forgotten and obsolete plugin code.


RSS feed | Trackback URI

4 Comments »

Comment by Andy Bargery Subscribed to comments via email
2007-08-28 06:47:47

Very useful thanks. I’ve been using WordPress for about a year and have installed and un-installed countless plugins, so much that I have a folder on my hard disk with about 50 plugins, some in use, some not.

What this means is I’m practically a hostage to my current theme. Not a bad thing, as I really like it, but it does make it more costly to make larger changes. This seems like a very good idea indeed to keep print outs of the read me files!

 
Name (required)
E-mail (required - never shown publicly)
URI
Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

Trackback responses to this post

ss_blog_claim=85f01294d5e7bb5fef0d6e569c52d7ee
Warning: stristr() [function.stristr]: Empty delimiter. in /nfs/c02/h05/mnt/40765/domains/jasonbartholme.com/html/wp-content/plugins/wassup/wassup.php on line 2093