# Optimising the WordPress database with a plugin

> Clean out old revisions, spam comments and transients with a database optimisation plugin to keep WordPress fast.

Source: https://helpcenter.ruachost.com/wordpress/guides/using-a-plugin-to-optimize-wordpress-database/

Over time, your WordPress database accumulates unnecessary data such as post revisions, spam comments, and transient options. This can slow down your site. On **ruachost.com**, you can optimize your database easily using a plugin.

## Why Optimize the Database?

- Reduces database size and improves performance.
- Removes clutter like old revisions, trashed posts, and spam comments.
- Speeds up queries and page load times.
- Helps maintain a healthy WordPress installation.

## Recommended Plugin: *Optimize Database after Deleting Revisions*

This plugin is lightweight and effective for cleaning up WordPress databases.

### Steps to Install and Configure:

1. **Log in to WordPress** with an administrator account.
2. In the dashboard, go to **Plugins → Add New**.
3. Search for **Optimize Database after Deleting Revisions**.
4. Click **Install Now**, then **Activate**.
5. In the dashboard, go to **Settings → Optimize Database**.
6. Configure options:

   - Set how many revisions to keep per post.
   - Exclude specific database tables from optimization.
   - Enable automatic optimization scheduling.
7. Click **Save Settings**.
8. To run optimization manually, click the **Optimize Database** link in the admin bar.

✅ The plugin will clean up unnecessary data and reduce database size.

## Important Notes

- Always back up your database before running optimization.
- Avoid running optimization during peak traffic times.
- Some plugins may store data in custom tables, exclude them if necessary.
- Regular optimization helps keep your site fast and efficient.
