Codex tools: Log in
Just as with your house, WordPress requires a little housekeeping once in a while to keep it working right. Here is a list of things you should do on a regularly scheduled basis to keep your WordPress site running smoothly.
If a new release of WordPress is out, we recommend that you upgrade. These new releases often include new and improved features and fixes. You don't have to install a new release the very day it comes out. You can wait. It is recommended to check in with WordPress for updates and upgrades at least every three months, six months at the most. Check WordPress or WordPress Downloads for latest version available.
Plugins are an exciting feature of WordPress. They add functions and features to your WordPress site such as adding customized post listings to featuring a local weather forecast on your site.
With the hundreds of plugins available, it's fun to test drive them, trying out different ones to see what they will do, if you need them, and if they really add to your site or clutter things up. Once in a while, you should do a little housekeeping on your plugins.
Every three to six months, check for the latest plugin version. This is easy to do from the Administration > Plugin Panel. If an update is available, WordPress will notify you with a banner below the plugin. Just click the "upgrade automatically" link, or click the "Download" link if you would prefer to upgrade manually.
To uninstall a WordPress Plugin:
The Plugin will initate the deactivation.
Most WordPress Plugins have an option to completely uninstall themselves, though not all. If you wish to remove a WordPress Plugin permanently:
WordPress plugins are being added constantly. Maybe there is a new plugin that will do what one of your older plugins do, but better? Maybe there is a plugin out there that will add functionality that will benefit your WordPress site?
Every three to six months search the Internet or visit the WordPress plugin sites to see if there are any new plugins available that will improve your site. If they replace the functions of a plugin you already have installed, be sure and follow the plugin author's instructions for removal or the tips in the Delete Old or Unwanted Plugins section in this article.
Please note that you should never delete the default WordPress theme.
Just like plugins, many users love test driving all the different WordPress Themes available. Some users might have twenty or more Themes in their theme list. If you aren't using them, why not do a little housekeeping on your themes?
If you have been developing and designing your own theme to tweak it to exactly what you want, and it's been working well for a while, it might be time to do a little housekeeping on your theme templates and style sheet.
While you were designing your template files, you probably added a few things you commented out because they didn't work right or you weren't sure you really needed them, but left them there just in case you wanted them later. If you still don't want them, go through your template files and delete those commented out codes and tags.
Optimizing your templates and style sheet is part of the normal activity of website designers and developers. While you have your template files open, take a moment to clean out some unwanted spaces. Having spaces before a code is fine, but there may be hidden ones after your code lines that just make the file size larger. There also might be three blank lines before some of the code when a single blank line might be all you need to separate some code from the pack. Delete those blank lines, but take care not to remove any spacing that should be left. Familiarity with PHP and HTML helps with this process.
Just as with your template files, it may be time to do a little housekeeping on your style.css file in your Theme folder. There is more information on optimizing your stylesheet below, but start first by cleaning out the unwanted stuff in your stylesheet.
Look for comments you've made to remind you of the things you did and changed. Do you still need them to remind you of modifications you made, or can they be deleted?
Look for empty lines and extra line endings and delete those down to one blank line to clean up your file size.
Is your stylesheet a jumble of style references? Is it grouped alphabetically and are you tired of hunting through lines of code to find everything in your core structure (header, content, sidebar, footer) when it might be more convenient to group these together? Or maybe you have it grouped by section and similarity and you want it sorted alphabetically. Either way, it might be time to do a little housekeeping and arrange your stylesheet the way that works best for your needs.
Tired of your old theme's look? Maybe it's time to do a little presentation housekeeping and change the look of your WordPress site. Thanks to WordPress's support for themes, changing your site's look is easy.
Check out the various resources for WordPress Themes. If you find one you like, install it and then activate it.
Don't worry, your old theme will still be there. Test drive the new one for a while. You can always go back to the old one. If you are really determined to turn your theme housekeeping efforts into some serious work, check out the article on Theme Development to create your own unique theme.
Many users upload a lot of graphics to their site that they end up never using. If you find yourself with a lot of unused graphics and images, consider going through them and cleaning house by deleting them.
If you aren't sure you will never need them again, but you aren't using them now and want to remove them from your site if server site space is limited, move them to a folder in your hard drive WordPress folder called backupimages or something similar and store them there, just in case.
Over time, your WordPress database can generate what's called "overhead." This condition is similar to a defragmented hard drive. Read this post for more information on how to optimize your database.
If you are using a WordPress Theme you haven't modified, you shouldn't have to worry about optimizing your website. Still, it might help. Site optimization means creating a "lean and mean" website that loads fast, is easy on the bandwidth, validates, and meets web standards.
WordPress stresses that code and style files should validate and be laid out with a lot of tabs so they are easy to read. The World Wide Web Consortium and the Web Standards Organization stresses that all web page code be compliant with their standards. If you are going to get into this, you should familiarize yourself with the most basic of these standards.
One of those standards is to present a clean and optimized style sheet and XHTML code. We've covered some of the housekeeping cleaning chores associated with WordPress files and functions, but if you really want to streamline your site's code, take it a step further and look into your site optimization options.
Basically, total site optimization means validating your site's HTML and CSS, testing the site's design across browsers, ensuring web standards are met, including standards for accessibility - but let's start with some simple cleaning.
Every space, character, and bit in your code and style sheets add up to bytes. That sentence came to about 64 bytes. Each byte of information adds up, and the larger they are, the longer they take to load. Do yourself and your users a favor by keeping your file sizes to a minimum. So where do all these bandwidth wasters hide?
If you have set your code to look pretty with lots of indents, have you checked to see if there are any TAB codes at the end of the line before the line break? In some themes, there tend to be a lot of those. You don't need a TAB before a line break, only after, but somehow, these sneak into the code.
Using spaces to line up code adds to the size. A TAB is considered one character in most editors, but the five spaces that copy the TAB indent takes up five characters. Using double spaces instead of single spaces in your code and styles adds up, too.
Using a good search and replace capable text editor, you can quickly clean these up, making your styles and code optimized for fast loading.
There are a lot of ways of optimizing your code and styles, and here are some resources for more information on creating lean and mean code:
In the article, Lessons: WordPress Site Maintenance, we cover website maintenance, but take a moment now to go through this list of WordPress housekeeping chores and add them to your calendar so you can clean up your site on a regular basis, keeping your WordPress site a lean and clean site to visit.