WordPress is one of the most recognized blog platforms on the web. It’s adaptable and loved by both individual casual bloggers and by large organizations that pump out dozens of posts per week. The Dashboard (WordPress’s UI) has evolved into a serious tool for web 2.0 blogging and offers a simple, yet powerful, environment unsurpassed by most other platforms.
WordPress and it’s ease-of-use doesn’t mean it’s “maintenance free.” Every so often a WordPress user should do some virtual spring cleaning to tidy up their database and WordPress files. Here are a few ways to keep your site running like the well-oiled blog you want:
- Before making any changes, use the Maintenance Mode plugin to temporarily stop activity that writes to your database (i.e. any user/visitor generated content). Activate maintenance mode and check to ensure it’s working properly by opening a second browser session (not another tab or window) and visiting your URL. Make sure that you aren’t logged in as admin in the second browser (you want to see what your readers will, not what you still can as admin.) Everyone visiting your site will see a single temporary page with a customized “site undergoing maintenance” message.
Now that your blog is in a proper holding pattern let’s move on to creating a backup of your database. There are three very simple ways to back everything up without accidentally damaging your database: use the built-in export feature, a WP plugin, or do it yourself from the PHPMyAdmin interface.
- WordPress’s built-in export feature can be accessed from the dashboard’s left-hand menu under “tools”. You can use this to create and save an XML version of your WP database if your blog isn’t too big. Saving it to your local machine will make it easily accessible and ready to use should you need it.
- If you’re already using an auto-backup plugin like DBC Backup simply verify that your most recently backed-up version is current. Do this by accessing your site via FTP and reviewing the date on the backed-up files. If you’re uncertain how to use FTP, your site’s web host will have instructions for you to follow or a simple web-based interface for you to use. I like to make a copy of my blog’s backed-up database and save it to my local machine (redundancy never hurts when backing up data!)
- Advanced users or users comfortable with a more “do it yourself” method can backup their WordPress database using phpMyAdmin. WordPress has a very easy-to-follow guide on their site. This is what I prefer when I work on my database because I like to see exactly what tables in my database have changed. Don’t be afraid, it’s really quite simple!
Your database is now successfully backed up, but the database itself doesn’t include the installed core WordPress files, settings, themes, plugins or images. The fastest way to backup these files is by copying all of the folders in your site’s blog directory and saving them to folder on your computer. You can also save a copy in a different directory folder on your server.
Now your readers know your blog really didn’t disappear and you’ve got a good backup copy of both your database and the entire contents of your site’s directory. Let’s move on to some good spring cleaning!
- From the WordPress dashboard you can add, edit, and delete plugins and themes without ever seeing the “backend”. This is a nice feature, but you may not realize what actually gets left behind in the form of unused database tables and empty theme or plugin folders/files when you’ve worked through the dashboard’s UI. Whenever I delete a plugin or theme I use an FTP client to access WordPress and manually delete unused features. It’s a good rule of thumb to make certain any themes or plugins you’re deleting are disabled before you manipulate them via FTP.
- After you’ve removed unused files and folders you can access your database from phpMyAdmin to review the WordPress database’s tables. There are only 11 default tables necessary for WordPress to function, any additional tables you find have most likely been created by past or present themes and plugins. An easy way to figure out what those extra tables were (or are) used for is to Google the table name. Once you’ve determined the table contains unused data you can delete (drop) it – but, be very cautious… deleting tables from your database can cause your site to malfunction if not done properly. If you have a problem and your site breaks you’ve got a backup of your database and files to re-install. When in doubt, ask someone with a more advanced knowledge of WordPress to help you.
- In WordPress 2.6 a new feature was introduced that allows the writer to restore a previously saved version of an post or page. The feature is useful, but creates lots of redundant data in the database. My blog’s database became an unruly mess filled with data I didn’t need. I use Delete-Revision to clean things up and keep extra data to a minimum. It’s not necessary to run this program every day, once per week will do.
- I also use Search Regex to manage individual pieces of data in my blog posts. Installing this plugin will allow you to search (and delete or replace) for a word or phrase throughout your post and page content, excerpt, titles, URL, and meta-data, as well as comment content and author data. It’s a simple way to update content to keep links and attachments fresh. For example, I previously hot-linked all of my blog images to my FlickrPro account, then later decided to self-host the same images. I did a search for “http://www.flickr.com/photos/krissib/” and replaced it with “/images/myblogimagesdir/”.
- If you’ve moved your blog or changed domain names you’ve probably got old links that result in 404 errors. To fix this, I use Broken Link Checker because it will check your posts (and pages), looking for broken links, and let you know if any are found. You can easily revise your broken links or edit them out of your site entirely.
- In addition to checking for broken links, the Redirection plugin will manage 301 redirections, keep track of 404 errors, and generally tidy up any loose ends your site may have. This is particularly useful if you are migrating pages from an old website, or are changing the directory of your WordPress installation. If you’ve missed any broken links, this plugin will create a log of what needs to be fixed.
There are numerous other plugins available for WordPress to help maintain your site to keep unused or outdated information from clogging the lines. Visit the WordPress Plugins page or use the new “add new plugin” feature on your WordPress Dashboard.
© 2010, Krissi Bates (iKrissi). All rights reserved.