As you already deleted all the posts in the table, this is going to be quite a bit of work manually.
For the next time you do something like that, use wp_delete_post( $postid, $force_delete );
(Codex) while looping through all the posts with that posttype, as this function deletes all the data associated with that post.
$args = array(
'posttype' => 'yourposttype',
'numberposts' => -1
);
$todelete = get_posts( $args );
foreach( $todelete as $deletethis ) {
wp_delete_post( $deletethis->ID, true );
}
In your case, you will have to check the following tables for data (I skip the tableprefix here):
- posts (which you already did)
- postmeta
- comments/commentmeta
- term_relationships
In all cases you will have to search for entries with the post_id
/object_id
NULL or with no entry in the posts table, and delete them. The SQL should be pretty straight forward.
Related Posts:
- What is this JavaScript “require”?
- Oracle SQL query for Date format
- Failed to connect to mysql at 127.0.0.1:3306 with user root access denied for user ‘root’@’localhost'(using password:YES)
- Can I have multiple primary keys in a single table?
- How can I make updates to a site, on a development copy, but then move updates back without overriding live site’s evolving database?
- get_results using wpdb
- wpdb->insert multiple record at once
- How to migrate a HTTPS WordPress installation to localhost?
- Database connection close
- How to monitor server for error establishing a database connection
- How to create bulk page and content? [closed]
- Importing posts from old website to new conflicting post ID’s?
- Fatal error: Call to undefined function dbDelta()
- Connect to remote database using Localhost install
- remove missing image attachments
- Transient RSS feeds in wp_options not removed automatically?
- Best way to move live site local
- The revisions table in my database is at 70% capacity and growing. What should I do?
- WordPress for a very large website
- How to ensure data consistency in WordPress
- Database location in WordPress
- WooCommerce with thousands of products – site is very slow – optimize db queries? [closed]
- WP_list_table bulk_action get edit and delete
- How to display data from custom table in wordpress database?
- Change SQL get_results to search for posts with custom term in custom taxonomy
- wpdb query on custom table not working [closed]
- How to diagnose and keep in check encoding issues?
- Add search Value to wp_list_table pagination
- stdObject stored in database. How does one convert it to usable format?
- I have a table I created, how do I make a form for a user to filter the data?
- Trigger Plugin database update after git pull
- wp_redirection_404 table has grown to 7GB
- Does WordPress ever need multiple databases?
- Why are no posts showing despite my apparently correct DB restoration?
- Cannot update custom database table row
- Change WordPress prefix for only one table?
- Multiple wp_options tables to share content across installs
- Select two sums with single get_var statement
- How to get the SQL of the changes made to the database from an update or upgrade?
- Merging two databases without borking it
- Is there a smart way to obtain a list of only some selected user meta data?
- Why does importing copies of the database dump and the document root make WordPress data inconsistent?
- Permit Login if table row exists
- Make an Items attribute searchable (taxonomy using existing attribute)
- How Yoast SEO plugin works with variable %%name%%?
- What would Repair and Optimize WordPress Database do?
- Store partial database to an archive database time to time
- Saving zero as meta value
- Migration: Copying database content to a different server
- Query multiple tables at once?
- Transferring/Uploading Data from DB to WordPress
- How to convert srcset links from https to http?
- Delete all posts that do NOT have a specific tag
- Changing order of db results when encoding to JSON
- How to transfer from localHost to live but use the already existing database on the server?
- Backing up WordPress database and files
- How not to display ALL items of a database
- Connect a membership plugin to an external database
- How to get the records from start with A to G in php and mysql
- Storing user’s data on external database on other server
- Link multiple user databases together?
- is it right choose to connect database in template page directly in WordPress site?
- I wanted to Know that how can I give ingore to 0000-00-00 in my config file
- Set a cron job to delete a specific database table table every midnight
- Two separate wordpress installations at one domain
- Is there a way to edit the WP content database in an admin panel or external page?
- Can we store password in without being hashing?
- SQL database import #1046 error
- Get all top categories, then only 3 posts for each
- Having all “non-PHP” files on a different server
- I would like some help wth an SQL query to link posts with categories
- Error establishing a database connection in wordpress
- Where is the HTML-handler part in the wpdb class?
- Finding a page holding a specific string/URL that is used in the content
- “wordpress error in establishing database connection” and missing tables
- next comment id number wordpress
- Adding last value from Database as text in WordPress Page
- Migrate not successful, DB is broken. How to fix, or at least output static HTML without plugins?
- Both VPS and domain changed but Database URL stayed the same and PHPmyadmin inaccessible to change it
- Backup Restore turns carriage returns to literal strings
- I have a WordPress 4.6 database dump – how do I use it in a new install?
- Filtering data and saving query results
- Find/ascertain latest wordpress db from multiple database copies
- Local Content different from Remote Content
- Check if a database is well installed
- save content in to wordpress wp_post table of database
- WordPress + Postgresql
- Author ID mismatch from database
- Share WordPress Database
- DB access blocked when initializing WP externally
- Saving data to database and exporting to excel
- Site does not work right, pages not showing up, even for root admin
- ERROR: “Table Prefix” must not be empty
- How do you build a database-centric site in WP?
- One information repeated on multiple locations on one site [closed]
- WordPress: Interact with Database Query Data and Login
- Showing Error(TAble already exist)
- Getting an error when trying to migrate to DV server from Grid with Media Temple [closed]
- Cant Connect to Database
- WordPress database connection failed, while mysql client is working [closed]