When managing a WooCommerce site, especially in a development or staging environment, there may be times when you need to delete all orders. This could be to refresh the database during testing or before syncing data from a live environment. Using MySQL to delete orders is efficient and direct but should be handled with care … Continue reading “MySQL Query: How to Delete all WooCommerce Orders”
Tag: mysql
How to Change WordPress Table Prefix of mySQL Database
Changing the WordPress table prefix in your MySQL database enhances security by reducing the risk of SQL injection attacks targeting default table names. Here’s how you can do it safely and efficiently. Step 1: Back Up Your Database Back up your website before making any changes to ensure you can quickly restore it if something … Continue reading “How to Change WordPress Table Prefix of mySQL Database”
phpMyAdmin Repair and Optimize Database Tables Tutorial
Sometimes, it might be necessary to repair a MySQL database table. This can be the case if your WordPress site acts weirdly or slowly. So, for instance, when you notice that modified settings in your WordPress dashboard are not permanently saved, it could indicate a corrupted database table. Another indicator for a corrupted MySQL table … Continue reading “phpMyAdmin Repair and Optimize Database Tables Tutorial”
Update procedures for Ubuntu Server, Nginx and MySql
These update procedures contain only essential information and best practices for updating a running ubuntu server and keeping the downtime low. Ubuntu 16.04.6 to Ubuntu 18.04 Backup – If you use a cloud hoster like digitalocean, create a snapshot. It’s recommended to power off the VM before creating the snapshot for keeping file integrity. If … Continue reading “Update procedures for Ubuntu Server, Nginx and MySql”
Change Language Collation of all mySQL Database Tables
If the language collation of your production and staging site database server is different you can use the MySQL query below to create a new query that allows you to change the language collation of all database tables at once. SELECT CONCAT(“ALTER TABLE “, TABLE_SCHEMA, ‘.’, TABLE_NAME,” COLLATE latin1_general_ci;”) AS ExecuteTheString FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=”DATABASE_NAME” AND … Continue reading “Change Language Collation of all mySQL Database Tables”