Bulk remove custom post type and its attachments with wp-cli?

To do this, you could use wp post list and pipe the output into wp post meta delete using xargs. Here’s an example command to delete the featured images in the meetings post type: wp post list –post_type= meetings –fields=ID –format=csv | xargs -I % wp post meta delete % _thumbnail_id You can use wp … Read more

Set Site Icon programmatically (eg. using `wp cli`)

The ‘official rules’ about site icons are here:https://www.w3.org/TR/html5/links.html#link-type-icon . They provide this example of site icons for several sizes: <link rel=icon href=favicon.png sizes=”16×16″ type=”image/png”> <link rel=icon href=windows.ico sizes=”32×32 48×48″ type=”image/vnd.microsoft.icon”> <link rel=icon href=mac.icns sizes=”128×128 512×512 8192×8192 32768×32768″> <link rel=icon href=iphone.png sizes=”57×57″ type=”image/png”> <link rel=icon href=gnome.svg sizes=”any” type=”image/svg+xml”> The above link also specifies if the ‘link … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)