How to get a list of all posts and their categories?

If you want to export the data to a CSV or JSON file directly from the SQL query, you can use the MySQL INTO OUTFILE clause. SELECT wpd9_posts.post_title, GROUP_CONCAT(wpd9_terms.name) AS categories FROM wpd9_posts LEFT JOIN wpd9_term_relationships ON (wpd9_posts.ID = wpd9_term_relationships.object_id) LEFT JOIN wpd9_term_taxonomy ON (wpd9_term_relationships.term_taxonomy_id = wpd9_term_taxonomy.term_taxonomy_id) LEFT JOIN wpd9_terms ON (wpd9_term_taxonomy.term_id = wpd9_terms.term_id) WHERE … Read more

How to make OR condition in WP_Query

WP_Query does not handle this sort of query: use two instances of WP_Query, and then combine the results. Untested code: $posts = new WP_Query( array( ‘post_type’ => ‘post’, ) ); $post_ids = array_column( $posts->posts, ‘ID’ ); $author = new WP_Query( array( ‘post_type’ => ‘any’, ‘author’ => 123, ‘post__not_in’ => $post_ids, // prevent duplicates ) ); … Read more

This SQL request call all time and overload my server : SELECT meta_value FROM wp_sitemeta WHERE meta_key = ‘wp_installer_network’ AND site_id = 1

What is it It’s most likely a part of the WPML. This is based on a quick copy paste of wp_installer_network into the github search box. There’s also a small chance this is the Types plugin, but you mentioned you had a multilingual plugin installed. No references to wp_installer_network are found in WordPress itself. and … Read more