About Us Client Area Deal of the Month Testimonials Portfolio FAQ Blog
Tips & Guides

Cleaning the WordPress WP Options Table: Complete Guide

Gianluca Gentile
· 7 min read
Are you tired of seeing your WordPress site become slower and less responsive over time? You’re not alone! The speed of a website is crucial not only for offering an excellent experience to users, but also for ranking well on search engines. One of the main causes of your site slowing down could be the WP Options table, a fundamental part of the WordPress database which, if not managed correctly, can fill up with useless and superfluous data. But don’t worry, because today I’ll guide you step by step on how to clean this table, freeing you from the data you don’t need and significantly improving your site’s performance. Keep reading to find out how to identify unnecessary data, remove it safely and keep your WordPress site fast and performant over time. Your site will thank you and your visitors will notice the difference!

1. Understanding the WP Options Table

The WP Options table stores a wide range of data:

Cleaning this table can significantly improve your site’s performance. Before you start, make sure to make a complete backup of your database to avoid losing important data.

2. Identifying Useless Data

To effectively clean the WP Options table, it’s essential to identify which data can be removed. Here are some key steps:

3. Using Plugins for Cleaning

There are various plugins that can help you clean the WP Options table without requiring advanced technical knowledge:

Install one of these plugins from the WordPress repository and follow the instructions to clean the WP Options table.

4. Manual Cleaning of the WP Options Table

If you prefer a more manual approach, you can clean the WP Options table directly through phpMyAdmin:

  1. Access phpMyAdmin: from your hosting control panel, access phpMyAdmin and select your WordPress site’s database.
  2. Select the WP Options Table: find the wp_options table (the wp_ prefix may be different if you changed the database prefix during the WordPress installation).
  3. Searching for Useless Entries: use SQL queries to spot and remove the useless entries. For example, to find expired transients:

    SELECT * FROM wp_options WHERE option_name LIKE ‘{6fb8dad3a9c483f1a21adb5997a0bd0fb65a4b2f8344003d223c5d2f2542798c}_transient_{6fb8dad3a9c483f1a21adb5997a0bd0fb65a4b2f8344003d223c5d2f2542798c}’;

  4. Delete the Identified Entries: after verifying that the found entries can be deleted, run the SQL query to remove them:

    DELETE FROM wp_options WHERE option_name LIKE ‘{6fb8dad3a9c483f1a21adb5997a0bd0fb65a4b2f8344003d223c5d2f2542798c}_transient_{6fb8dad3a9c483f1a21adb5997a0bd0fb65a4b2f8344003d223c5d2f2542798c}’;

Identifying Plugins and Deleting WP Options Table Rows

When you uninstall a plugin, often residual options remain in the database that can take up unnecessary space and slow down your site. Identifying and removing these entries can be a bit complex, but with a few targeted steps it’s possible to do it effectively. First of all, make a complete backup of your database to prevent the loss of important data. Here’s how to proceed:

  1. Identifying Plugin Prefixes: each WordPress plugin usually uses a specific prefix for its own options in the database. To spot which entries belong to a given plugin, you need to know these prefixes. For example, the WooCommerce plugin uses prefixes such as _woocommerce_ or _wc_.
  2. Using phpMyAdmin to Search for the Prefixes:
    • Access phpMyAdmin from your hosting control panel.
    • Select the Database of your WordPress site.
    • Find the WP Options Table: it’s usually named wp_options, unless you’ve changed the database prefix.
    • Run a Search Query: to find all the options related to a specific plugin, run an SQL query that searches for the prefixes used by that plugin. For example, for WooCommerce:

      SELECT * FROM wp_options WHERE option_name LIKE ‘{6fb8dad3a9c483f1a21adb5997a0bd0fb65a4b2f8344003d223c5d2f2542798c}woocommerce{6fb8dad3a9c483f1a21adb5997a0bd0fb65a4b2f8344003d223c5d2f2542798c}’;

  3. Reviewing and Deleting the Options:
    • Analyse the Results: check the entries returned by the query to make sure they’re actually related to the uninstalled plugin.
    • Delete the Useless Entries: once you’ve confirmed that the entries are useless, you can run a query to delete them. For example:

      DELETE FROM wp_options WHERE option_name LIKE ‘{6fb8dad3a9c483f1a21adb5997a0bd0fb65a4b2f8344003d223c5d2f2542798c}woocommerce{6fb8dad3a9c483f1a21adb5997a0bd0fb65a4b2f8344003d223c5d2f2542798c}’;

  4. Using a Cleaning Plugin: if you don’t feel comfortable using phpMyAdmin or SQL queries, you can use specific plugins such as Advanced Database Cleaner that help you spot and remove the residual plugin options safely and easily. These tools scan the database, identify the orphaned options and let you delete them with a few clicks.

5. Regular Maintenance

To keep your WordPress site optimised, it’s important to carry out regular maintenance of the database. Schedule periodic cleanups of the WP Options table and other database components to ensure that your site stays fast and responsive.

Keep Your Site Fast and Performant

Cleaning the WordPress WP Options table is a crucial operation to keep your website efficient and fast. By following the steps described, you can eliminate the useless data that weighs down the database, thus improving the site’s overall performance. Don’t forget to make regular backups and use reliable plugins to make the cleaning process easier. Periodic database maintenance is essential to prevent future problems and ensure an optimal user experience.

FAQ

1. Why does the WP Options table slow down my site?

The WP Options table can accumulate useless data, such as orphaned options and expired transients, which slow down database queries and therefore site performance.

2. Which plugins can I use to clean the WP Options table?

Plugins such as WP-Optimize, Advanced Database Cleaner and Transient Cleaner are excellent tools for cleaning and optimising the WP Options table.

3. Is it safe to delete the WP Options table entries?

Yes, it’s safe if you know what you’re doing. Always make a complete backup of the database before proceeding with the cleaning.

4. How can I identify the plugin prefixes?

Each plugin uses specific prefixes in the database options. Use phpMyAdmin to search for these prefixes and identify the useless entries.

5. How often should I clean the WP Options table?

It depends on the site’s usage and the installed plugins. A quarterly cleanup is good practice for most WordPress sites.

#backup #Guida #hosting #ottimizzazione #ottimizzazione WordPress #Woocommerce #Wordpress