WP-Optimize: Free Database Clean-up & Image Optimization Plugin

Learn how to setup WP-Optimize for WordPress MySQL database clean up and image upload compression for free. We can also schedule an automatic database and images optimization per needs.

There are multiple ways to optimize the web server and also WordPress for speed and security. One way to optimize the database and clean up obsolete data is by using the WP-Optimize plugin.

This plugin recently also added the feature to compress and serve optimize media images.

In this article, we are going to learn how to set up and schedule the WP-Optimize plugin for automated MySQL database clean up and also compress the image size.

If you’re following us, this is the sixth article and video demo in #WordPressCloud series. We previously published about WordPress Fail2ban plugin setup for improving security and protection from brute force attack.

Without further ado, let’s dive into setting up WP-Optimize —

Install WP-Optimize Plugin in WordPress

Let start off with installing the WP-Optimize plugin in our WordPress CMS. Follow the steps to install WP-Optimize:

  1. Login to WordPress Dashboard
  2. Navigate to Add New under Plugins menu
  3. Search and Install WP-Optimize plugin from WordPress repository
  4. Activate the Plugin
  5. Now you’ll see a new menu added into your WordPress menu options — WP-Optimize

Install and Activate WP-Optimize Plugin in WordPress

Click on the menu to navigate to Database Optimization.

Database Optimization and Clean-up

This is the first menu option to manually clean up the database. You can view all the existing database tables that can be optimized. Just hit on the [Run Optimization] command button again each action.

You can also select the checkbox against each command that you want to run and run the optimization in a go. Say for example if I want to clean up post revisions, delete the trashed post, and spam comments. Then need to enable the checkboxes against the same and hit on [Run all selected optmization] command button.

Run Manual Database Optimization Clean up in WP-Optimize

The next tab under the Database menu is to view all the ‘Tables’ in our MySQL database installation against WordPress. This tab will display all the tables that are generated due to plugins and options that we have installed in our WordPress.

Database tables - WP-Optimize Plugin

If there are any obsolete database from uninstalled plugins, you can also delete the entire table from this tab.

Image Optimization Setup

As I mentioned, this was the new feature added into WP-Optimize and I think it’s a really great addition. I was using the WP reSmush.it plugin to compress and optimize images.

Now, this plugin has added the feature to use the same reSmush.it API to compress the images, I no longer need the extra plugin. Hence, I uninstalled the plugin and set up the image file optimization with the WP-Optimize plugin itself.

Navigate to Images menu under WP-Optimize and setup per your needs. My current setup looks like below:

WP-Optimize Image Compression and Optimization

This Image Optimization set up helps with:

  1. Automatically Optimize the Images when uploaded — generally take 30 mins after uploading
  2. Show the compression size and total file size saved after compression
  3. Optimize and compress the image losslessly to retain the maximum details and EXIP data
  4. And lastly, retain the original image backup to revert back if anything goes wrong

As you can see, there are two compression services available: reSmush.it & Nitrosmush. I never tested how much compression different each makes, however, I’m pretty happy with reSmush.it service.

We can also view all the existing images that are pending for compression. You can select your existing media library and bulk optimize from this tab.

Compressing images using WP-Optimize

Scheduling a Clean-up in WP-Optimize

The automatic clean-up scheduling option is available under the Settings menu. We can also select the option to retain the data up to a certain time period like 1 week or 2 weeks etc. Once the retention period is surpassed, the data is can be deleted with manual clean up or scheduling option.

schedule clean up on weekly

You can schedule the clean-up for database table for daily, weekly, fortnightly, and monthly. And also select the database tables that you need to clean-up per schedule. Though the scheduling feature is BETA, it works flawlessly and helps in auto-maintenance of WordPress DB.

database clean up schedule enabled in WordPress WP-Optimize plugin

Video demo of WP-Optimize Plugin Setting

Watch the setup by step video tutorial of WP-Optimize set up for database and image optimization. There are also options to enable/disable the comments as well as trackbacks under the Settings tab.

Setup WP-Optimize: Database Clean up & Image Optimization Plugin for Free!

I hope you liked the video, please subscribe to the youtube channel for more.

What’s Next in #WordPressCloud series?

Now that we’ve learned how to optimize the WordPress database and media library. Next, we are going to learn how to set up the free WordPress Photon for images CDN without using the JetPack plugin.

If you've any thoughts on WP-Optimize: Free Database Clean-up & Image Optimization Plugin, then feel free to drop in below comment box. Also, please subscribe to our restoreBin YouTube channel for amazing videos tips. Cheers!

Share

2 Responses

  1. Danilo Coca says:

    Hi, first of all thanks for the tutorial, I really enjoy your video tutorials

    After to do this tutorial in my website, It starts to show this error:

    “Error establishing a database connection”

    Can you help me with this error ? In the Future is possible to this error apear again ?

    • Kushal Azza says:

      Thank you, Danilo. Glad that you find these tutorials helpful. 🙂

      Regard your query, looks like your WordPress is not able to connect to MySQL server. These might be couple of possible reasons and solutions.
      1. Your MySQL server is not configured with WordPress — verify if your `wp-config.php` file has correct MySQL Database details
      2. Your MySQL server is down — consider restarting using `sudo service mysql restart`
      3. If you’re getting this database connection error intermittently — consider adding a swap space on your cloud server (covered in this hyperlinked article)
      4. If the issue still persists even after adding `swapspace` — upgrade your server to next higher RAM size plan

      If you followed the guide, then probably you might have $5 DigitalOcean plan. Upgrading to $10 with 2GB RAM should eliminate the `error establishing a database connection`.

      Let me know how it goes with you!

Leave a Reply

Your email address will not be published. Required fields are marked *