Hello,
Please try the following script for the DB:
DELETE FROM wp_posts WHERE post_type=’properties’;
DELETE FROM wp_postmeta WHERE post_id NOT IN (SELECT id FROM wp_posts);
DELETE FROM wp_term_relationships WHERE object_id NOT IN (SELECT id FROM wp_posts)
IF you use PHP code, try the following request:
$allposts= get_posts( array(‘post_type’=>’properties’,’numberposts’=>-1) );
foreach ($allposts as $eachpost) {
wp_delete_post( $eachpost->ID, true );
}
Please note that the great amount of listings can cause timeout error of the server with these requests.
I should note that we do not recommend to delete the listings from the DB directly. This kind of deletion will leave some listings data on the server.
Please make sure you have full website backup before any changes on it.
Thanks.
Thread Starter
USREC
(@hawaiirealestate)
GET SQL ERROR
#1054 – Unknown column ‘’properties’’ in ‘where clause’
Thread Starter
USREC
(@hawaiirealestate)
wp_posts does not contain post_type=’properties’