SQL Statement – Mass Delete Custom Post Types

Trust you have backed up your wordpress database. In any case, as the article suggests, worth trying with a select statement first to see which posts are returned: SELECT DISTINCT ID, post_title, post_type, post_status, d.taxonomy, e.name FROM wp_posts a LEFT JOIN wp_term_relationships b ON ( a.ID = b.object_id ) LEFT JOIN wp_postmeta c ON ( … Read more

WordPress VIP realpath Alternative?

I don’t know what “wp vip” wants or needs, but you should be loading files by means of get_template_part, locate_template, site_url, or home_url and I am guessing that using one or more of those is what the “scan” wants. It is hard to say exactly which since you posted only the error and not the … Read more

What is the debian-sys-maint MySQL user (and more)?

What is debian-sys-maint used for? One major thing it is used for is telling the server to roll the logs. It needs at least the reload and shutdown privilege. See the file /etc/logrotate.d/mysql-server It is used by the /etc/init.d/mysql script to get the status of the server. It is used to gracefully shutdown/reload the server. … Read more

WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version [closed]

There are multiple ways to fix this. You can either remove the if-condition containing SHOW TABLES LIKE (remove lines: 117, 135 and 137, 157). That should work as the dbDelta function checks itself if the tables are already presend. Or you could just add some single quotes to the table names in the lines 117 … Read more

How to import database table as custom post type and custom fields?

// There’s a confusion in which method you are importing your external table into WordPress. If someway you have parsed you external table data into a PHP variable ex: $data, then it would be simple to import. foreach( $data as $_dt ) { $new_id = wp_insert_post( array( ‘post_type’ => ‘vehicle’, ‘post_status’ => ‘publish’, ‘post_title’ => … Read more

add_blog_option blog ID

In multisite each blog/site gets his own tables with the blog id in the prefix, so once you install a network installation your database should have these tables: wp_1_options wp_2_options