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 →

DO NOT UPGRADE GLOBAL TABLES WPXSS - DO_NOT_UPGRADE_GLOBAL_TABLES

DO_NOT_UPGRADE_GLOBAL_TABLES

DO_NOT_UPGRADE_GLOBAL_TABLES is a WordPress constant that can be added to the wp-config.php file in order to avoid the upgrade functions from doing expensive queries against global tables. To enable it, simply add the following to your wp-config.php file: WordPress websites that use bbPress have large users and usermeta tables. When upgrades are running, ALTER, DELETE … Read full article →

Reset WordPress password from the command line - Reset WordPress password from the command line

Reset WordPress password from the command line

1. log in to the MySQL: mysql -u root -p; 2. Select the database: use database_name; 3. List all users: select * from wp_users\G 4. Change the password for the user you require: UPDATE wp_users SET user_pass=MD5(‘new_password_here’) where ID=user_id_here;

How to delete all comments in WordPress - How to delete all comments in WordPress? 🗑️💬

How to delete all comments in WordPress? 🗑️💬

WordPress uses the wp_commentmeta and wp_comments tables to store comments and their data. To delete all comments in WordPress simply empty those tables in the database: To delete all spam comments use: To delete all unapproved comments use: NOTE: In the above commands change wp_ prefix with the table prefix that you are using *(view … Read full article →

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 →

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 →

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 →

wpcli export specific tables wordpress - Dumping specific tables using mysqldump or WP-CLI

Dumping specific tables using mysqldump or WP-CLI

For high-traffic websites, I advise developing a stagging website if you make significant updates or even switch the WordPress theme entirely. But one significant problem I encountered while moving from the staging site to the live one is that all database tables are updated, which could result in financial loss if the website receives multiple … Read full article →