Two of the biggest problems you can have with any website is a slow site or a lost site (due to hacking, server problems, or even accidental deletion). How are these two problems related? The answer is your database. It’s the connection to a MySQL database that makes WordPress a CMS. The care and maintenance of this database is a critical part of keeping your site healthy. This post is going to talk about ways to speed up your WordPress site as well as keeping it backed up.
Speed Up Your WordPress Site
Let’s address speed first. Keeping your database running smoothly is one of the easiest ways to start optimizing your website. Over time your database grows and sometimes the items in the database aren’t being used anymore. Similar to running a defragment operation on the hard drive of your computer, it’s a good idea to run some optimization on your database.
This optimization can do a few things for you. First, any tables that need repairing can be identified and in most cases fixed. Next, the optimization process can find areas in the database that have become bloated with information that is no longer needed. For example, WordPress stores revisions of your pages and posts. You can limit the number of revisions that are stored and help speed the database. Removing spam comments is another way of optimizing the database, and plugins like Akismet can help with this process. Deleted items can leave remnants all over your database so removing them is another key optimization effort. Additionally, expired transients need to be purged. A transient offers a temporary way to store information in the database, and when they expire they aren’t always removed as they should be. Finally, plugins or themes that have been installed and removed often leave the records they created in your database. Even if you just tested a plugin, it can leave information behind.
There are several tools that can help you to automate your database optimization. Be sure to have a backup of your database before you begin any optimization and as always, we recommend you perform a test of the process on a staging site. Here are a couple of well-known tools:
- There are a host of other plugins available to optimize your WordPress database. You can find reviews and update information on the WordPress repository.
Aside from the clean up tasks that are broken down above, some types of plugins can cause your database to grow more than others. If at all possible, offload the functionality from these plugins to another source. The plugins to watch for are:
- Anti-Spam Plugins
- Security Plugins
- Statistic Plugins
- Related Posts and Popular Posts Plugins
- Link Tracking Plugins
All of these plugins are storing information in the database for each item they are tracking, comparing, linking. Over time this information builds up. Look for plugins that allow you to disable or purge database items that are no longer necessary. This can speed up your WordPress dramatically.
Back Up Your WordPress Site
The other half of this equation is making sure that you have a backup of your database. If you’ve been doing any kind of work with WordPress you’ve probably heard this when talking about security, when talking about making changes, or when talking about hosting. Having a solid backup can save you countless time and money. WordPress backups have two components; the files and folders that comprise the structure of the site and the database that holds all of the unique content, configurations, and comments that make up your site. Of the two, the database holds the more valuable information. Information that, if lost, would mean starting over.
Backups can be created in a variety of ways. Some hosts, like WP Engine, perform regular backups for you and you can rollback to a saved state very easily. You can even create additional save states as needed if you’re performing work. You can also create backups using plugins. There are many plugins to choose from. Here is a small sample:
You can choose from the best rated on the repository as well. Additionally, manual backups could be performed and knowing how to perform them isn’t a bad idea. However, most people (even developers) prefer a more automated approach.
There are a few keys factors when you’re making your choices. First, make sure the database and files are being backed up. You should be able to automate the process and set the frequency for the backup. In addition, you should be able to choose the destination for the backups. This destination should NOT be on your website hosting. Ideally, you’re sending the backups to a server you have direct control over or even emailing the files to yourself. The security of these backups is important and leaving them on insecure servers can be like handing over your credentials. So, if you’re emailing files make sure that they are encrypted. Finally, be sure to test the restoration process for the backup method you choose. Having a backup is great but, ultimately useless if you’re unable to restore from it.
How Can We Help You?
You can fill out the form below to reach out to us about your project. We promise not to resell your contact information or to send you spam (we hate it too).