wp-config debug ‘false’ or ‘true’

You’re defining WP_DEBUG_LOG twice, first as false and then as true. Doing some very rudimentary testing on my local PHP installation… php > define( ‘X’, true ); php > define( ‘X’, false ); PHP Warning: Constant X already defined in php shell code on line 1 php > print_r( X ); 1 …it seems clear … Read more

Developing a “fallback” for empty wp_query results based on post dates

PHP strtotime() takes some weird string values that we can use in combination with the WP_Query date_query ‘before’ keyword. For example, we can get X posts before 1 year before tomorrow: $tomorrow_a_year_ago = wp_date( ‘Y-m-d’, strtotime( ‘-1 year +1 day’ ) ); $args = array( ‘post_type’ => ‘post’, ‘posts_per_page’ => 5, ‘post_status’ => ‘publish’, ‘orderby’ … Read more

How to connect wordpress with db using ssl client certificate

I finally found a solution. I had to extend the wpdb class inside wp-contents/db.php. It looks like this: <?php /** * WordPress Database Access Abstraction Object * Custom DB Connection class to provide ssl connection to the database */ class ssldb extends wpdb { /** * Connects to the database server and selects a database. … Read more

Automatic image conversion to HEIF breaks Gallery on Safari

This is a known issue. A fix is set to be included in release 6.7.1: Targeted Fixes […] The following are bugs that should be included if ready, but as understood now are not affecting as many people or are less problematic: […] Using the Upload button in image-based blocks in Safari unexpectedly converts images … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)