How to manually delete post from database without causing conflicts?

Drop this into a file in your plugin directory and you should be able to do this from your WP installation using a query string. /* Plugin Name: Delete Specific Post Description: Rid the post forever! Version: 0.1 Author: WPSE License: GPL2 */ add_filter(‘query_vars’, ‘delete_post_query_var’); function delete_post_query_var($vars){ $vars[] = ‘delete_post’; return $vars; } add_action(‘admin_init’, ‘manually_delete_post’, … Read more

404 Error after URL update

You might have already done this, but while logged into the admin of your site, go to Settings > General and then review the urls in WordPress Address (URL) and Site Address (URL). If they do not read with the new domain name, then they need to be updated. Once you have the correct urls … Read more

SQL phpmyadmin remove posts from cat id exclude condition

finally I find right code with helping by ChatGPT DELETE p FROM wp_posts p INNER JOIN wp_term_relationships tr1 ON (p.ID = tr1.object_id AND tr1.term_taxonomy_id = 2) LEFT JOIN wp_term_relationships tr2 ON (p.ID = tr2.object_id AND tr2.term_taxonomy_id = 20) WHERE p.post_type=”post” AND p.post_status=”publish” AND DATEDIFF(NOW(), p.post_date) > 180 AND tr2.term_taxonomy_id IS NULL; Lets try another way … Read more

tech