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 →

WordPress FS METHOD explained - WordPress FS_METHOD explained

WordPress FS_METHOD explained

The constant FS_METHOD determines the filesystem method that WordPress should use for reading, writing, modifying, or deleting files. To set a different method for file editing, simply edit your wp-config.php file and add the line: The FS_METHOD forces the filesystem method and accepts the following values: Method Description direct Use Direct File I/O requests from within … Read full article →

Missed schedule error wordpress - WordPress Missed Schedule Error

WordPress Missed Schedule Error

WordPress Missed Schedule error means that the Scheduled post was not published for some reason: There are a few possible reasons for the WordPress Missed Schedule Error: 12.12.2022 UPDATE: There is a bug in WordPress 6.1 that causes this error WordPress Timezone Settings WordPress Timezone Settings are located under Settings → General From there, make … Read full article →

Show Last Updated date for Posts - Show Last Updated date 📅 for Posts

Show Last Updated date 📅 for Posts

Here is a simple code snippet that you can add to your theme functions.php file to show the “last updated” date in your posts. A new line will be added to the beginning of the post content if the last modified and published time is different:

display a list of wordpress core files anywhere on your website - Display List of all WordPress core files

Display List of all WordPress core files

Here is an example of a simple WordPress plugin that uses a shortcode to display a list of files from the WordPress repository on GitHub: <?php /* Plugin Name: List WordPress Core Files Description: Displays a list of files from the WordPress repository on GitHub. */ function wpfl_shortcode_handler( $atts ) { // Parse shortcode attributes … 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 →