Adding high performance keys to MySQL tables to speed up WordPress - Adding high-performance keys to MySQL tables to speed up WordPress 🧑🏿‍🚀

Adding high-performance keys to MySQL tables to speed up WordPress 🧑🏿‍🚀

wp_postmeta table should be the biggest table in your database, if not, there is a problem. Read wp_actionscheduler_actions & wp_actionscheduler_logs tables When you install WordPress for the first time, tables are created in the database, for example for the wp_postmeta table: the problem? solution: On an existing tables, We can add high-performance keys that match … Read full article →

2 - Use mysql2date  to convert date string obtained from the database into a readable date

Use mysql2date to convert date string obtained from the database into a readable date

Instruction: Parameter PARAMETER TYPE DESCRIPTION DEFAULT REQUIRED $format string Output can be PHP date format or Unix timestamp. no yes $date string mysql2date() only recognizes “Ymd H:i:s” format, so the original timestamp string needs to be converted to this format. no yes $translate boolean If true, the specified date and format string will be passed … Read full article →

WordPress database error Table .dbwp options is marked as crashed and should be repaired - WordPress database error Table './db/wp_options' is marked as crashed and should be repaired [✔️ SOLVED]

WordPress database error Table ‘./db/wp_options’ is marked as crashed and should be repaired [✔️ SOLVED]

Here are 4 different methods to fix the scary-looking error: “WordPress database error Table ‘./db/wp_options’ is marked as crashed and should be repaired”. NOTE: It is critically important that you backup your database before performing any of the following suggestions. You’re fully responsible for undertaking this yourself, I can’t be held responsible if you break … Read full article →

Delete Expired WordPress Transients - Delete Expired WordPress Transients 🚮

Delete Expired WordPress Transients 🚮

WordPress uses transients to temporarily store data for its plugins and themes. By managing transients you can optimize your website for speed and make sure your website is always functioning properly. Here are a few methods how to safely delete expired WordPress transients: Delete Expired WordPress Transients using WPCLI To delete only expired transients use: … Read full article →

Optimize WordPress Database Tables - Optimize WordPress Database Tables

Optimize WordPress Database Tables

There are several ways you can optimize the MySQL database used by your WordPress site: Optimize tables Optimize all tables in your database: OPTIMIZE TABLE wp_posts, wp_comments, wp_options, wp_usermeta, wp_term_relationships, wp_term_taxonomy, wp_termmeta; Replace wp_ with the database prefix that you are using for your WordPress installation. Repair tables Repair any damaged tables in your database: … Read full article →

Bulk Delete Millions of WooCommerce Products using SQL - 🗑️ Bulk Delete WooCommerce Products using SQL

🗑️ Bulk Delete WooCommerce Products using SQL

While building and testing WooCommerce addons, I find myself in need of quickly deleting all WooCommerce products from the database. WPCLI is the easiest way to go, as you can achieve the desired results via a single line. NOTE:  if your database prefix isn’t the default wp_, you’ll need to change it with your actual database … Read full article →

Suggestions to reduce the wp options table size - Suggestions to reduce the wp_options table size

Suggestions to reduce the wp_options table size

In this post I discussed an example where wp_options table had 900k rows of plugin-based data in it, causing the wp-admin dashboard to load slowly. As noted there, good coding practice is for each plugin to create its own database tables and use those instead of default WP tables. While the WordPress community actively improves … Read full article →

WPXSS CLANCI - wp_actionscheduler_actions & wp_actionscheduler_logs tables

wp_actionscheduler_actions & wp_actionscheduler_logs tables

WooCommerce plugin uses the wp_actionsscheduler_actions table in the database to log scheduled actions such as cron’s running, product synchronization, upgrade, etc. These actions should be deleted once they are executed but this doesn’t always happen, in most cases, this table uses an InnoDB database engine with a row-level locking feature meaning that multiple queries can … Read full article →